How to exclude class in TestNG?

后端 未结 8 1229
囚心锁ツ
囚心锁ツ 2020-12-30 05:17

Is this possible to exclude classes in testng.xml?

I tried with


    

         


        
8条回答
  •  我在风中等你
    2020-12-30 05:53

    There is no direct way to skip test class though testng.xml. However there are workaround which can used to ignore particular test class.

    1. Declare the test class as abstract.
    2. Implement IAnnotationTransformer listener interface and set enabled = false to all test methods in a particular class marked with your custom annotation.

    The same topic discussed in testng-user group but no direct answer refer the mail thread - Re: [testng-users] Ignore a class in testng

提交回复
热议问题