Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Aug 2019
    Posts
    360

    In TestNG how can you disable a test?

    In TestNG how can you disable a test?

  2. #2
    Senior Member
    Join Date
    Nov 2018
    Posts
    1,033
    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.

  3. #3
    Senior Member dennis123's Avatar
    Join Date
    Apr 2013
    Location
    Bangalore
    Posts
    2,734
    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 )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.