Is there a test class specific listener ( similar to Junit runner ) in TestNG? -
existing junit setup :
i have written junit test runner parses test class before execution , reads custom annotations written on each testable method in test class .based upon aggregated value of annotations formulate configuration use setup test environment , manipulate . when tests executed based upon manipulation done on test environment generate result .
current state :
now evaluating testng same task .i understand terminologies , ways of execution bit different in testng . have different suites file various suites in testng , each of suite has test section multiple test classes inside . wanted did junit (as mentioned above) in testng , hence when suites execute , each test class executed before execution of test class want perform environment setup , manipulation .i saw documentation various listeners in testng , haven't been able find specific listener purpose (capable of intercepting individual class execution ). listener doing need or there way achieve want ?
i not looking execute test setup programatically , want evaluate capabilities of testng hence please provide answer seek rather condemning approach .
could post example of test class looks like, custom annotations use , explain do?
based on description, imethodinterceptor
might need (testng gives list of methods it's run , chance alter list).
Comments
Post a Comment