如何用Gradle中的不同系统属性值多次运行测试 [英] How to run tests multiple times with different system property values in Gradle
问题描述
我想知道如何在Gradle中运行我的测试套件两次,并为系统属性设置不同的值。现在我可以设置一个系统属性,例如:
test {
systemPropertyorg.d2ab.sequence.strict ,true
}
但我怎样才能设置属性为false并运行测试套件又是什么?
只需添加另一个 Test 任务。
test {
systemPropertyorg.d2ab.sequence.strict,true
}
任务test2(类型:Test){
systemPropertyorg.d2ab.sequence.strict,false
}
check.dependsOn test2
请参阅 here 查看默认测试任务由 I'd like to know how to run my test suite in Gradle twice, with different values set for a system property. Right now I can set a system property using e.g.: But how can I set the property to false and run the test suite again? Just add another Test task. See here to see where the default test task is added by the 这篇关于如何用Gradle中的不同系统属性值多次运行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! java $添加的位置c $ c>插件。
test {
systemProperty "org.d2ab.sequence.strict", "true"
}
test {
systemProperty "org.d2ab.sequence.strict", "true"
}
task test2(type: Test) {
systemProperty "org.d2ab.sequence.strict", "false"
}
check.dependsOn test2
java
plugin.