【问题标题】:cannot run junit5 under eclipse (2020-06 (4.16.0))eclipse下无法运行junit5(2020-06(4.16.0))
【发布时间】:2020-06-30 21:12:38
【问题描述】:

我可以在命令行下运行 junit5 测试或在 eclipse 中作为 Gradle 测试运行;但是在eclipse中以junit运行它就失败了:

java.lang.NoClassDefFoundError: org/junit/platform/commons/PreconditionViolationException 在 org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createUnfilteredTest(JUnit5TestLoader.java:75)

我在旧的 eclipse 和新的 eclipse 2020-06 (4.16.0) 中看到了这个错误。我错过了什么?

【问题讨论】:

标签: eclipse junit5


【解决方案1】:

Eclipse 2020-06 正在使用 junit jupiter 引擎 v5.6。您的应用程序很可能正在使用较低版本。尝试将您的应用依赖项更改为最新的 junit jupiter 版本。

【讨论】:

    猜你喜欢
    • 2021-03-13
    • 2020-10-07
    • 2020-11-16
    • 1970-01-01
    • 2020-12-24
    • 2020-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多