1.4. Example of ITestListener
has methods on following events:
- is invoked after the test class is instantiated and before any configuration method is called
- is invoked on success of a test
- is invoked on failure of a test
- is invoked whenever a test is skipped
- is invoked each time a method fails but is within the success percentage requested.
- is invoked after all the tests have run and all their Configuration methods have been called.
and an method. It has four test methods:
is our test class. It has a- is expected to run fine
- is expected to fail as it doesn’t throw the expected exception
- receives a parameter but since we haven’t set a it is skipped
- is invoked five times, of which, twice its going to fail. We have set the expected to 50.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.