Category:
TestNG
By setting the “enabled” attribute as false, we can disable a test method from running.
//In case of a test method
@Test(enabled = false)
public void testMethod1() {
//Test logic
}
//In case of test method belonging to a group
@Test(groups = {“NegativeTests”}, enabled = false)
public void testMethod2() {
//Test logic
}