Well, I'm a bit confused.
public class GroupDemo {
@Test()
public void test1() {
System.out.println("test1");
}
}
and
public class GroupDemoChild extends GroupDemo{
@Test
public void atest(){
System.out.println("atest");
}
@AfterMethod
public void after() {
System.out.println("after method");
}
}
And what is logical to expect here:
test1
atest
after method
However I get:
test1
after method
atest
after method
So after()
is invoked twice.
How do I run it only after methods of declaring class?
TestNG = 6.8.5; Java = 1.7