I have a test cast package setup to run. However, there are some test cases in the package I want to exclude. How should I do it if I do not change the code? as far as I know testng does not have feature that to exclude single test case inside the package.
How to exclude some selenium test cases from the package?
1.7k Views Asked by Feixiong Liu At
2
There are 2 best solutions below
1

As you are using TestNg, the easiest option is adding (enabled = false) after the @Test annotation.
@Test(enabled = false)
public void yourTestMethod() throws Exception {
//your code here
}
See here for information on annotations.