Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory

You ran into Eclipse bug 525948 which has already been fixed and which will be published in the upcoming release Oxygen.3 (4.7.3), March 21, 2018.

As workaround, put your test code in a separate project and add the project under test to the modulepath, but do not add a module-info.java to your test project. With your project, class and module naming, it should look something like this:

See also my video that shows Java 9 and JUnit 5 in Eclipse Oxygen.1a in action

Leave a Comment