简体   繁体   English

TestNG在多个类别中测试优先级

[英]TestNG tests priority in multiple classes

I have 2 calasses, every class has 2 tests: Class A, Test 1 (priotity 1), test 2 (priority 2) Class B, Test 1 (priotity 1), test 2 (priority 2) 我有2个Calasses,每个班级都有2个测试:A级,测试1(优先级1),测试2(优先级2)B级,测试1(优先级1),测试2(优先级2)

when i execute my tests the order is: A1 B1 A2 B2 当我执行测试时,顺序为:A1 B1 A2 B2

i need it to run like this: A1 A2 B1 B2 我需要它像这样运行:A1 A2 B1 B2

here is a thread with a similar issue, but this does't work for me. 这是一个存在类似问题的线程,但这对我不起作用。 I added group-by-instances="true" but it does't work. 我添加了group-by-instances =“ true”,但是它不起作用。

enter link description here 在此处输入链接说明

只需使用dependsOnMethods代替所有套件的全局priority

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM