简体   繁体   English

Jenkins:Cucumber 测试运行程序执行顺序

[英]Jenkins: Cucumber Test Runners execution order

In my automation project I have two test runners:在我的自动化项目中,我有两个测试运行器:

@RunWith(Cucumber.class)
@CucumberOptions(features = ".",
        plugin = {"json:target/json","rerun:rerun.txt","io.qameta.allure.cucumberjvm.AllureCucumberJvm"})
public class MainTest {
}





@RunWith(Cucumber.class)
@CucumberOptions(features = "@rerun.txt",
        plugin = {"json:target/json","rerun:rerun.txt","io.qameta.allure.cucumberjvm.AllureCucumberJvm"})
public class FailedScenarioRerunTest {
}

I want to run first MainTest and next FailedScenarioTest, how to do it?我想先运行 MainTest 和下一个 FailedScenarioTest,怎么做? In theory test should run with features alphabetical order, at local machine it's exactly like that, but in Jenkins order is not alphabetical.理论上测试应该按字母顺序运行,在本地机器上完全一样,但在 Jenkins 中,顺序不是字母顺序。 anyone had to deal with such a problem?有人必须处理这样的问题吗?

Answer is:答案是:

<runOrder>alphabetical</runOrder>

in surefire configuration in pom.xml在 pom.xml 中的安全配置中

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

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