硒黄瓜测试在并行执行时需要更长的时间?

selenium cucumber tests taking longer time while executing in parallel?

到目前为止,我能够通过使用多个 运行ner classes 并行 运行 cucumber-jvm 测试,但是随着我的项目的增加和新功能的增加时间,所以优化执行时间变得非常困难

所以我的问题是优化执行时间的最佳方法是什么

到目前为止,我使用的线程数为 8,而且我 运行ner classes 也是 8

到目前为止,使用这种方法还不错,但是其中一个功能最近添加了更多场景,需要更长的时间才能完成 :( 那么如何在这里优化执行时间...

非常感谢任何帮助!!

这对我有用:

Courgette-JVM

它增加了 运行 在功能级别或场景级别并行测试黄瓜的功能。

它还提供了一个选项来自动重新运行失败的场景。

用法

@RunWith(Courgette.class)
@CourgetteOptions(
    threads = 10,
    runLevel = CourgetteRunLevel.SCENARIO,
    rerunFailedScenarios = true,
    showTestOutput = true,
    cucumberOptions = @CucumberOptions(
            features = "src/test/resources/features",
            glue = "steps",
            tags = {"@regression"},
            plugin = {
                    "pretty",
                    "json:target/courgette-report/courgette.json",
                    "html:target/courgette-report/courgette.html"}
    ))
    public class RegressionTestSuite {
    }