Bug 551389 - Cannot run JUnit 5 tests from Maven project
Summary: Cannot run JUnit 5 tests from Maven project
Status: CLOSED DUPLICATE of bug 551298
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-23 18:03 EDT by Alex Boyko CLA
Modified: 2021-04-19 13:24 EDT (History)
4 users (show)

See Also:


Attachments
Workspace with the project (20.21 MB, application/zip)
2019-09-23 18:03 EDT, Alex Boyko CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2019-09-23 18:03:19 EDT
Created attachment 279993 [details]
Workspace with the project

Open the workspace with Eclipse 4.13 for Java Developers.
Attempt to run projects JUnits. Failed to launch tests. ClassNotFoundException is the culprit (See below)

Note that if the same workspace is opened with Eclipse 4.12 then JUnits start fine and successfully executed.

Debugging shows that test process starts on both 4.12 and 4.12 with exactly the same command and exactly the same classpath entries. Must be something with the JDT JUnit5TestLoader or RemoteTestRunner...

CNFE:
java.lang.NoClassDefFoundError: org/junit/platform/commons/PreconditionViolationException
	at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:90)
	at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:48)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
	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)
Caused by: java.lang.ClassNotFoundException: org.junit.platform.commons.PreconditionViolationException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 6 more
Comment 1 Sarika Sinha CLA 2019-09-23 23:19:05 EDT
Moving to JDT UI which owns JUnit.
Comment 2 Noopur Gupta CLA 2019-09-30 03:24:48 EDT
Looks like bug 551298.

*** This bug has been marked as a duplicate of bug 551298 ***
Comment 3 Denis Roy CLA 2021-04-19 13:24:43 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/