java - TestNG global @AfterMethod -
in java testng possible somehow specify global (or suite wide) method @aftermethod
annotation? goal have different test cases in separate classes(so 1 file = 1 test) have common @aftermethod
without duplicating method in every class.
you can achieve making superclass. example:
public class basictestscenario { @aftermethod(alwaysrun=true) public void teardown() { // implementation } }
then have tests inherit class.
public class mytest extends basictestscenario { // test }
Comments
Post a Comment