问题描述
这是我的长跑选手。我试图通过覆盖dataprovider方法使用在cumul-jvm 4.0.0中内置的内置并行机制。我看到我的方案是并行调用的,但是线程数始终默认为10。我尝试使用--threads选项作为
,但它不起作用。
Here is my cuke runner. I am trying to use inbuilt parallelism built in cucumber-jvm 4.0.0 by overriding dataprovider method. I see that my scenarios are invoked in parallel however the thread count defaults to 10 always. I tried executing with --threads options as state in GitHubbut it doesnt work.
mvn test -Dcucumber.options="--tags @test --threads 3"
mvn test -Dcucumber.options="--threads 3"
两者都尝试过,但默认情况下仍产生10个线程。我在这里想念什么?我知道还有其他方法可以使用temyers插件或qaf 3rd party插件在库克中实现并行性。但是我的问题非常针对我的CLI黄瓜选项中我缺少什么?
Tried both but still 10 threads are spawned by default. What am i missing here? I know there are others ways to achieve parallelism in cukes using temyers plugin or qaf 3rd party plugin. But my question is very specific to native parallel support of cucumber-jvm 4.0.0 What am i missing here in my CLI cucumber options?
package cuke.runner;
import org.testng.annotations.DataProvider;
import cucumber.api.CucumberOptions;
import cucumber.api.testng.AbstractTestNGCucumberTests;
@CucumberOptions(features= {"src/test/resources/features"},glue="com/sd")
public class TestRunner extends AbstractTestNGCucumberTests{
@Override
@DataProvider(parallel=true)
public Object[][] scenarios() {
return super.scenarios();
}
}
推荐答案
pass在命令行中-Ddataproviderthreadcount = 1000参数
pass arguments -Ddataproviderthreadcount=1000 in command line
这篇关于黄瓜-testng 4.0并行执行默认始终为10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!