如何解决带有Cucumber Gradle的TestNG,无法覆盖命令行中的黄瓜选项
IDE:IntelliJ 生成工具:Gradle 测试框架:带有黄瓜的TestNG
我在跑步者类中指定了CucumberOptions。我想从命令行覆盖它,并提供不同的标签。我看到并遵循了如此多的视频和帮助,但似乎无法使其正常工作。我的项目仅包含gradle.properties文件,而没有testng.xml或Cucumber.xml文件。我一直在尝试使用>>>> ./gradlew test -Dcucumber.options =“-tags @something”命令行。我的跑步者班级看起来像这样。...
@CucumberOptions(tags = "@nothing",features = {"src/test/resources/features"},glue = "steps",plugin = {"pretty","json:target/cucumber-report.json"})
@Test
public class TestRunner extends AbstractTestNGCucumberTests {
@Override
@DataProvider(parallel = true)
public Object[][] scenarios() {
return super.scenarios();
}
}
我的build.gradle文件看起来像这样.....
test {
systemProperty "cucumber.options",System.getProperty("cucumber.options")
useTestNG()
jvmArgs(["-Ddataproviderthreadcount=${System.getProperty("threads")}","-Dcucumber.options=${System.getProperty("cucumber.options")}"])
scanForTestClasses = false
testLogging.showStandardStreams = true
systemProperties System.getProperties()
}
我想念什么?希望有新的眼光的人能看到我没看到的东西。非常感谢我能得到的任何帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。