【发布时间】:2019-08-27 06:55:45
【问题描述】:
基于 JUnit5 控制台启动器docs,似乎没有办法配置并行执行。 ConsoleLauncher 不支持并行执行还是应该在 junit-platform.properties 中设置配置就足够了?
我尝试使用 ConsoleLauncher(在 junit-platform.properties 中设置并行模式),但测试似乎仍然按顺序运行。不过,我可以通过 Gradle 并行运行它们。
【问题讨论】:
-
你试过
--config command-line option吗?也许使用这两个参数junit.jupiter.execution.parallel.enabled = true和junit.jupiter.execution.parallel.mode.default = concurrent- 我将其作为评论发布,因为我现在无法重现 -
你说得对,我必须在调用 ConsoleLauncher 时添加特定的配置。