TestNG: @Test at class level executing all methods -
i have tests need run sequentially, added @test(singlethreaded = true) classes.
works fine, problem @test @ class level, methods executed testng, if don't have @test annotation, causes time waste when team wants disable test, , he's not aware of particularity comments @test instead of whole method, later test should disabled end making build process fail.
is there way avoid this?
thanks
one way educate team :)
you can put new annotation on single test want disable i.e. in below, test 2 won't run.
@test(singlet..) public class testss { public void test1(){ system.out.println("test1"); } @test(enabled=false) public void test2(){ system.out.println("test2"); } public void test3(){ system.out.println("test3"); } }
Comments
Post a Comment