简体   繁体   中英

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? In theory test should run with features alphabetical order, at local machine it's exactly like that, but in Jenkins order is not alphabetical. anyone had to deal with such a problem?

Answer is:

<runOrder>alphabetical</runOrder>

in surefire configuration in pom.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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