gpt4 book ai didi

jenkins - 在 Jenkins 中使用 rerunner-jupiter 扩展时,'junit-jupiter' 未能发现测试

转载 作者:行者123 更新时间:2023-12-05 07:32:38 25 4
gpt4 key购买 nike

如果使用 rerunner-jupiter 失败,我将尝试重复选定的测试延期。它在 IntelliJ IDEA 中运行良好,但在 Jenkins 上失败并显示此消息,

org.junit.platform.launcher.core.DefaultLauncher handleThrowable

WARNING: TestEngine with ID 'junit-jupiter' failed to discover tests
java.lang.NoSuchMethodError: org.junit.platform.engine.support.filter.ClasspathScanningSupport.buildClassFilter(Lorg/junit/platform/engine/EngineDiscoveryRequest;Ljava/util/function/Predicate;)Lorg/junit/platform/commons/util/ClassFilter;
at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:49)
at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:61)
at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:130)
at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:117)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:82)
at org.junit.platform.surefire.provider.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:50)
at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:98)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:121)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:111)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Jun 28, 2018 3:22:16 AM org.junit.platform.launcher.core.DefaultLauncher handleThrowable

根本没有执行任何测试,整个测试套件一开始就失败了。

最佳答案

如果您正在运行名为 java9 模块的代码并且您错过了在 module-info.java< 中要求某些依赖项,您可能会收到消息“ID 为‘junit-jupiter’的 TestEngine 无法发现测试”/。看到这个答案:https://stackoverflow.com/a/65801052/1874113

关于jenkins - 在 Jenkins 中使用 rerunner-jupiter 扩展时,'junit-jupiter' 未能发现测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51080621/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com