How to disable TestNG test based on a condition

前端 未结 7 1315
挽巷
挽巷 2020-12-05 07:23

Is there currently a way to disable TestNG test based on a condition

I know you can currently disable test as so in TestNG:

@Test(en         


        
相关标签:
7条回答
  • 2020-12-05 08:05

    You have two options:

    • Implement an annotation transformer.
    • Use BeanShell.

    Your annotation transformer would test the condition and then override the @Test annotation to add the attribute "enabled=false" if the condition is not satisfied.

    0 讨论(0)
提交回复
热议问题