Community
Participate
Working Groups
When I want to run Unit Test (JUnit 5), Eclipse shows an pop-up with the title "Could not run test" and with the message "No tests found with test runner JUnit 5". In the Console tab i find the following exception: java.lang.NoSuchMethodError: org.junit.platform.launcher.Launcher.execute(Lorg/junit/platform/launcher/TestPlan;[Lorg/junit/platform/launcher/TestExecutionListener;)V at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209) (The gradle project has been imported into a new workspace, there was no migration from a previous version).
Looks like a plug-ins configuration issue. Please download a fresh installation of Eclipse 2019-03 and try again.
A fresh installation didn't solve the problem. After some tests it seems that it the problem comes from the gradle project itself. Unit Tests are working fine for new created projects but not for our application. I think you can close this issue, we have to find the problem in our project setup. Thanks for your help, Bernhard
Note that you should be using JUnit 5.4 with the latest Eclipse setup. https://www.eclipse.org/eclipse/news/4.11/jdt.php#junit-5.4
Could it be that it's a duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=545849 ? Does the problem get fixed if you use version 1.4.1 of junit-platform-launcher ?
It seems that this issue is a duplicate of 545849. After adding testRuntime group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.4.1' to my gradle file, tests are running fine.
Marking as a duplicate. *** This bug has been marked as a duplicate of bug 545849 ***