gpt4 book ai didi

java - 如何按顺序运行 Maven 测试

转载 作者:行者123 更新时间:2023-11-29 05:08:18 25 4
gpt4 key购买 nike

我有不同的类(class),每个类(class)都有一个或多个测试。

我想使用 testing.xml 按顺序对每个类运行 Maven 测试

测试.xml

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite1" verbose="1">
<test name="Regression1">
<classes>
<class name="test.settings.SettingsTest"/>
<class name="test.weather.WeatherTest"/>
</classes>
</test>
</suite>

当我在命令下运行时,它会运行所有测试。但是我想按顺序一个一个地运行 testing.xml 中指定的测试。

mvn -Dtests=testing.xml test

最佳答案

我不确定你的意思,但你试过吗:

<test name="Regression1" parallel="false" preserve-order="true">

关于java - 如何按顺序运行 Maven 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29649225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com