全面的TestNG框架教程:https://blog.csdn.net/df0128/article/details/83243822
1、设置case执行顺序
https://blog.csdn.net/Magic_Chen2012/article/details/86713175
2、批量执行测试用例
2.1、新建一个“.xml”的文件
2.2、文件配置信息
1 <?xml version="1.0" encoding="UTF-8"?> 2 3 <suite name="GN投放后台接口测试"> 4 <test name="配置态接口(冰原狼)" preserve-order="true"> <!--菜单管理--> 5 <classes> 6 <class name="com.alipay.ipay.icdpcore.test.TestCreateDeliveryPlanWithContent" /> 7 <class name="com.alipay.ipay.icdpcore.test.TestModifyDeliveryPlanWithContent" /> 8 <class name="com.alipay.ipay.icdpcore.test.TestQueryDeliveryPlanByPlanId" /> 9 </classes> 10 </test> 11 12 <test name="运行态接口(数据域)" preserve-order="true"> <!--菜单管理--> 13 <classes> 14 <class name="com.alipay.ipay.icdpcore.test.TestGetRecommend" /> 15 </classes> 16 </test> 17 </suite>
2.3、批量执行测试用例后的效果