![](/img/trans.png)
[英]How to run cucumber jvm test scenarios in parallel using Maven and courgette?
[英]How to run cucumber jvm test scenarios in parallel using Gradle?
您可以使用gradle任務執行此操作。
它增加了在功能級別或場景級別上並行運行黃瓜測試的功能 。
它還提供自動重新運行失敗方案的選項。
用法
@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 {
}
您應該嘗試使用QMetry Automation Framework的小靈通客戶端 。 通過使用它,您可以並行運行單個場景。 您將獲得TestNG xml運行配置, 詳細報告 ,並行執行,步驟監聽器等功能。
為了將現有的cucumber-jvm項目轉換為QAF以下是stpes:
@QAFTestStepProvider
注釋放在定義黃瓜步驟的類中 <test name="Gherkin-QAF-Test"> <parameter name="step.provider.pkg" value="your.pkg.where.steps.defined" /> <parameter name="scenario.file.loc" value="resources/features" /> <classes> <class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" /> </classes> </test>
您可以將標記用作運行配置過濾器和所有其他TestNG和QAF功能的組。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.