1.6. Example of IMethodInterceptor
interface is used to modify the list of test methods that we want TestNG to run. It will be invoked right before TestNG starts invoking test methods.
It has just one method to implement which returns the altered list of methods.
It has just one method to implement which returns the altered list of methods.
Lets being with our test class. has two test methods. One of the test methods is to test performance so we grouped it in “sanity”.
Suppose we want to only run the SANITY based tests and not the other tests, we will have to provide a listener that can filter out the other tests and return only SANITY based tests.
Suppose we want to only run the SANITY based tests and not the other tests, we will have to provide a listener that can filter out the other tests and return only SANITY based tests.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.