disable test in testng code example
Example 1: ignore test in testng
To ignore the test case, we use the (enabled = false) parameter :
@Test(enabled=false)
Example 2: disable test in testng
To ignore the test case, we use the (enabled = false) parameter :
@Test(enabled=false)
Example 3: how to exclude part of test in testng
By adding the exclude tag in the testing.xml
<classes>
<class name="TestCaseName">
<methods>
<exclude name="TestMethodNameToExclude"/>
</methods>
</class>
</classes>