In TestNG how can you disable a test?
In TestNG how can you disable a test?
Disabling a test in TestNG can be achieved by setting the enable attribute of the @Test annotation to false. This will disable the said test method from being executed as part of the test suite. If this attribute is set for the Test annotation at class level, all the public methods inside the class will be disabled.
Hi Friends,
When executing TestNG tests, there may be some scenarios where you may have to disable a particular test or a set of tests from getting executed. For example, consider a scenario where a serious bug exists in a feature due to certain tests belonging to certain scenarios that cannot be executed. As the issue has already been identified we may need to disable the said test scenarios from being executed.
Disabling a test in TestNG can be achieved by setting the enable attribute of the @Test annotation to false. This will disable the said test method from being executed as part of the test suite. If this attribute is set for the Test annotation at class level, all the public methods inside the class will be disabled.
@Test( enabled=false )
|
Bookmarks