【问题标题】:Is there a way to configure JUnit 5 thread count using a command line argument?有没有办法使用命令行参数配置 JUnit 5 线程数?
【发布时间】:2021-07-05 12:09:27
【问题描述】:

目前,要设置线程数,我必须更新 junit-platform.properties 文件中的以下属性:

junit.jupiter.execution.parallel.config.fixed.parallelism=5

有没有办法使用命令行参数来配置线程数?

【问题讨论】:

标签: java maven junit junit5 spring-test


【解决方案1】:

感谢@Slaw。 以下命令就像一个魅力:

mvn clean -Djunit.jupiter.execution.parallel.config.fixed.parallelism='10' test

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-21
    • 1970-01-01
    • 2021-04-14
    • 1970-01-01
    • 2020-07-02
    相关资源
    最近更新 更多