本文介绍了如何使用Gradle并行运行cucumber jvm测试场景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到使用gradle并行运行黄瓜测试场景的最佳解决方案



目前找到的最佳解决方案是 ..但是我无法在本地成功运行它。


解决方案

查看



您可以使用gradle任务执行此操作。



它增加了在 parallel 上运行黄瓜测试的功能功能级别场景级别

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

用法

  @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 {
}


I couldn't find best solution for running cucumber test scenarios in parallel using gradle

The best possible solution found so far is this.. but I can't run it locally successfully

Any help much appreciated!!

Thanks in advance.

解决方案

Take a look at Courgette-JVM

You can execute this with a gradle task.

It has added capabilities to run cucumber tests in parallel on a feature level or on a scenario level.

It also provides an option to automatically re-run failed scenarios.

Usage

@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 {
    }

这篇关于如何使用Gradle并行运行cucumber jvm测试场景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 09:03