问题描述
限时送ChatGPT账号..我正在使用 maven-failsafe 插件来触发配置类似于
I'm using the maven-failsafe plugin to trigger testng suites with configuration similar to
<suiteXmlFiles>
<file>src/test/resources/suites/somesuite.xml</file>
<file>src/test/resources/suites/anothersuite.xml</file>
<file>src/test/resources/suites/yetanothersuite.xml</file>
</suiteXmlFiles>
但是套件或其中的测试没有以正确的顺序执行.有没有办法指定套件应按以下顺序执行
but the suites or the tests within them are not getting executed in the correct order. Is there a way to specifiy that the suites should be executed in the below order
somesuite.xmlanothersuite.xml又一个suite.xml我不关心套件中测试的执行顺序,但只想在前一个套件完成后执行一个套件.是否有一些配置可以用来实现相同的目标?
I don't care about the order in which the tests within a suite is executed, but would like to execute one suite only after the previous one has completed. Is there some configuration which I could use to achieve the same?
推荐答案
创建一个单独的 testng.xml 文件并添加如下内容:
Create a seperate testng.xml file and add something like below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng/testng-1.0.dtd">
<suite name="Suite">
<suite-files>
<suite-file
path="path-to\suite1.xml" />
<suite-file
path="path-to\suite2.xml" />
</suite-files>
</suite>
然后将此 testng.xml 文件添加到您的 maven 套件中
And then add this testng.xml file to your maven suite
这篇关于按特定顺序执行测试套件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论