TestNG.xml参数配置-如何控制部分执行@test方法

如果在methods中标识了@test的方法,也可以在method中通过include和exclude来控制需要执行哪些方法

 <include name="testMethod1" />  

<exclude name="testMethod2" />  

<include name="testMethod3" />   

include:配置是可以执行 ,exclude:配置不执行该方法

执行testMethod1、testMethod3方法,testMethod2将不执行

原文地址:https://www.cnblogs.com/jtestroad/p/8695223.html