【发布时间】:2021-08-02 07:36:13
【问题描述】:
在我的build.gradle 我有以下测试任务
task test1(type: Test) {
ignoreFailures true
testLogging {
events 'started', 'passed', 'skipped', 'failed'
exceptionFormat "full"
showStandardStreams = true
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
failedTest += result.failedTestCount
}
}
}
include "org/company/project/test/Test1.class"
}
task test2(type: Test) {
ignoreFailures true
testLogging {
events 'started', 'passed', 'skipped', 'failed'
exceptionFormat "full"
showStandardStreams = true
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
failedTest += result.failedTestCount
}
}
}
include "org/company/project/test/Test2.class"
}
我希望这两个测试并行运行,目前我使用这个命令来运行它们./gradlew cleanTest test1 test2 --info --rerun-tasks命令来运行它们。
我试过--parallel、--max-workers=3 选项没有任何帮助。
【问题讨论】:
标签: testing gradle parallel-processing spock