“ no junit.jar”在IDEA 2021.3.3社区版中运行测试时的例外
我试图在IDEA 2021.3.3社区版(Debian Linux)中运行Kotlin Project的测试,请查看视频 https”> https:> https: //ibb.co/cb8jhfw 我收到了“ no junit.jar”的错误,并且在控制台中遇到了以下堆栈跟踪:
com.intellij.execution.junit.JUnitUtil$NoJUnitException: No junit.jar
at com.intellij.execution.junit.JUnitUtil.checkTestCase(JUnitUtil.java:393)
at com.intellij.execution.junit.TestPackage.createJavaParameters(TestPackage.java:230)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:865)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
at com.intellij.execution.configurations.JavaCommandLineState.getJavaParameters(JavaCommandLineState.java:44)
at com.intellij.execution.impl.DefaultJavaProgramRunner.patchJavaCommandLineParams(DefaultJavaProgramRunner.java:137)
at com.intellij.execution.impl.DefaultJavaProgramRunner.lambda$doExecuteAsync$5(DefaultJavaProgramRunner.java:163)
at com.intellij.execution.target.TargetEnvironmentAwareRunProfileState$1.run(TargetEnvironmentAwareRunProfileState.java:58)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:120)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:496)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:832)
与此同时,来自同一项目的子模块的一些测试运行良好(例如,Module Integration_test),您能告诉您发生了什么吗?
upd 我录制了问题的视频,请看一下 https://ibb.co /ls95pcn
I m trying to run Kotlin project's tests in IDEA 2021.3.3 Community Edition (debian Linux), please take a look at video https://ibb.co/cb8jhfW
I got the error "No junit.jar" and the following stack trace in the console:
com.intellij.execution.junit.JUnitUtil$NoJUnitException: No junit.jar
at com.intellij.execution.junit.JUnitUtil.checkTestCase(JUnitUtil.java:393)
at com.intellij.execution.junit.TestPackage.createJavaParameters(TestPackage.java:230)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:865)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
at com.intellij.execution.configurations.JavaCommandLineState.getJavaParameters(JavaCommandLineState.java:44)
at com.intellij.execution.impl.DefaultJavaProgramRunner.patchJavaCommandLineParams(DefaultJavaProgramRunner.java:137)
at com.intellij.execution.impl.DefaultJavaProgramRunner.lambda$doExecuteAsync$5(DefaultJavaProgramRunner.java:163)
at com.intellij.execution.target.TargetEnvironmentAwareRunProfileState$1.run(TargetEnvironmentAwareRunProfileState.java:58)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:120)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:496)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:832)
In the same time some tests from the sub-module of same project runs well (module integration_test for example) , could you tell what is going on?
UPD I have recorded the video of my problem, please take a look https://ibb.co/LS95PCN
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎父模块本身没有测试,也没有附带的Junit。您可以将运行配置更改为搜索“在整个项目中”(ACC到视频,您具有“单个模块”),然后想法应该找到所有测试。
It seems that parent module has no tests itself, and no attached junit as well. You can change your run configuration to search 'in whole project' (acc to video, you have 'In single module'), then IDEA should find all tests.