Community
Participate
Working Groups
Add support for JUnit 5 tests in org.eclipse.test.EclipseTestRunner.
Currently being held up implementing JUnit's tutorial: https://github.com/junit-team/junit5/issues/1294
See also bug 520811 which had a similar issue: org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath You can check JDT's test runner org.eclipse.jdt.internal.junit.runner.RemoteTestRunner and PDE's test runner org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner for implementation details. Can you reproduce it with a new plug-in project? If so, attach the sample project with steps to reproduce.
New Gerrit change created: https://git.eclipse.org/r/125130
Gerrit change https://git.eclipse.org/r/125130 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=3694dc310128b687abadb27ba8faf1133564cf88
New Gerrit change created: https://git.eclipse.org/r/126172
Gerrit change https://git.eclipse.org/r/126172 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=261a2c43ecd9c62771b382eb06437cd0098beb08
New Gerrit change created: https://git.eclipse.org/r/126199
Gerrit change https://git.eclipse.org/r/126199 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=21df6c58ad51eafc007fb99b53e71ba72d229839
New Gerrit change created: https://git.eclipse.org/r/126429
Gerrit change https://git.eclipse.org/r/126429 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=027e4f6d9a27b081a724e7c781f2baa07f576ba7
Sravan, can you please look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=534803#c50
New Gerrit change created: https://git.eclipse.org/r/127349
Gerrit change https://git.eclipse.org/r/127349 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=35f5de3bda795c5bc6bd8535935516e6f818fa2c
New Gerrit change created: https://git.eclipse.org/r/127385
Gerrit change https://git.eclipse.org/r/127385 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.buildtools.git/commit/?id=fc4a4cc2fa612ea8748cbb42acbd39f918e1a8ab
New Gerrit change created: https://git.eclipse.org/r/127409
Gerrit change https://git.eclipse.org/r/127409 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=7bf8f655b574cf88e2a83562f5b3b7d01039c773
New Gerrit change created: https://git.eclipse.org/r/127420
Just found out that tests using assumptions to prevent running are failing when run with JUnit 5.
(In reply to Alexander Kurtakov from comment #19) > Just found out that tests using assumptions to prevent running are failing > when run with JUnit 5. Is this the reason for ~200 test fails in every platform build?
(In reply to Andrey Loskutov from comment #20) > (In reply to Alexander Kurtakov from comment #19) > > Just found out that tests using assumptions to prevent running are failing > > when run with JUnit 5. > > Is this the reason for ~200 test fails in every platform build? I have found it via the 65 errors in swt suite on gtk2 (all caused by that) and I assume there are more such cases.
(In reply to Alexander Kurtakov from comment #21) > I have found it via the 65 errors in swt suite on gtk2 (all caused by that) > and I assume there are more such cases. Right. There also seems to be some infra/setup issue: JDT Compiler tests fail badly either with No Eclipse compiler found or java.lang.NullPointerException Looks like it's not finding the compiler.
(In reply to Dani Megert from comment #22) > (In reply to Alexander Kurtakov from comment #21) > > I have found it via the 65 errors in swt suite on gtk2 (all caused by that) > > and I assume there are more such cases. > > Right. > > > There also seems to be some infra/setup issue: JDT Compiler tests fail badly > either with > > No Eclipse compiler found > or > java.lang.NullPointerException > > Looks like it's not finding the compiler. There is a patch for that from Lucas https://git.eclipse.org/r/#/c/127420/ but it's up to JDT committer to determine whether this is right fix (Jay is set as reviewer).
New Gerrit change created: https://git.eclipse.org/r/127452
New Gerrit change created: https://git.eclipse.org/r/127453
New Gerrit change created: https://git.eclipse.org/r/127455
Gerrit change https://git.eclipse.org/r/127452 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=5e1ff1b531a3c47039431ad78fd54c7941d02f88
Gerrit change https://git.eclipse.org/r/127453 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.buildtools.git/commit/?id=2e86f72d376cb29d73dbb4a2684ba419c8e89eff
Gerrit change https://git.eclipse.org/r/127455 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=5e6f68202a8b6c903ab21930c471da86983ec1f7
Gerrit change https://git.eclipse.org/r/127420 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=6432fdd58a28b72dc3736bdded436559d4f912d6
(In reply to Eclipse Genie from comment #30) > Gerrit change https://git.eclipse.org/r/127420 was merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=6432fdd58a28b72dc3736bdded436559d4f912d6 Pushed directly (after two gerrit runs failed with different, unrelated issues). This should fix the new failures in jdt.core tests.
On most platforms, many pde api tools junit tests are failing with testInvalidClassMethodTag2F Failure Java heap space java.lang.OutOfMemoryError: Java heap space See 537976. Is this related to changes on this bug?
See bug 537976
*** Bug 537975 has been marked as a duplicate of this bug. ***
It seems fragment tests are broken. The EclipseTestRunner previously contained the method "loadSuiteClass" which handled fragment bundles correctly. In the new ClassLoaderTools there is no special code for fragments.
(In reply to Tobias Pongs from comment #35) > It seems fragment tests are broken. > > The EclipseTestRunner previously contained the method "loadSuiteClass" which > handled fragment bundles correctly. In the new ClassLoaderTools there is no > special code for fragments. Can you point to concrete tests please? I guess the fix should be in org.eclipse.test.ClassLoaderTools.getPluginClassLoader(String, ClassLoader), where the bundle is resolved?
(In reply to Andrey Loskutov from comment #36) > (In reply to Tobias Pongs from comment #35) > > It seems fragment tests are broken. > > > > The EclipseTestRunner previously contained the method "loadSuiteClass" which > > handled fragment bundles correctly. In the new ClassLoaderTools there is no > > special code for fragments. > > Can you point to concrete tests please? I guess the fix should be in > org.eclipse.test.ClassLoaderTools.getPluginClassLoader(String, ClassLoader), > where the bundle is resolved? I don't know some tests. I only have many tests in my own projects, which are not publicly available. When switching to the new 2018-09 release, I recognized, that my fragment tests could not be started.
The changes committed to fix this issue removes support for the "formatter=" argument to EclipseTestRunner and hence the org.eclipse.test.coretestapplication and uitestapplications (or to be specific, the output file name part of the argument is read, but the actual formatter part is ignored). While that may be good enough for Eclipse platform release engineering itself, there are Eclipse based products out there that use the Eclipse Test Framework to drive their tests and rely on options like these. Is anyone still working on this? Would it be possible to bring back support for formatter selection?
Any more work planned in this bug or can we close it?
(In reply to Lars Vogel from comment #39) > Any more work planned in this bug or can we close it? Not sure. Do you have the time to migrate some small test bundle to JUnit 5 but keep the JUnit 4 TestSuite used in test.xml so it continues being found and run by testframewok.
(In reply to Alexander Kurtakov from comment #40) > (In reply to Lars Vogel from comment #39) > > Any more work planned in this bug or can we close it? > > Not sure. Do you have the time to migrate some small test bundle to JUnit 5 > but keep the JUnit 4 TestSuite used in test.xml so it continues being found > and run by testframewok. We can try with Bug 531057.
org.eclipse.e4.ui.tests.css.core has been migrated to JUnit 5, so I guess we can close this one.
(In reply to Lars Vogel from comment #42) > org.eclipse.e4.ui.tests.css.core has been migrated to JUnit 5, so I guess we > can close this one. Unfortunately execution didn't succeed https://download.eclipse.org/eclipse/downloads/drops4/I20210202-1840/testresults/xml/org.eclipse.e4.ui.tests.css.core_ep419I-unit-cen64-gtk3-java15_linux.gtk.x86_64_15.xml tests="0" . Still has to be investigated what went wrong.
JUnit 5 will support soon test suites.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.releng/+/187276
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.releng/+/187276 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=8a0cf70f6acbe32b569d954c0d06a5cd0468f961
I'm trying to debug why Junit 5 tests are not executed but running out of time for today. Taking down my notes so that I or someone else can restart here: To debug: 1.) Create a new Junit test class, e.g.: ------- package org.eclipse.test; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class MyTest { @Test void test() { fail("Not yet implemented"); } } -------- 2:) Create an launch configuration using org.eclipse.test.uittestapplicattion as application and use the -classname org.eclipse.test.MyTest as argument parameter 3.) Start it -> works fine Next step would be try to point to the CSS core tests via this setup and test if they can be found if started from the IDE. Currently the Ant based build does not find them. See for example: https://download.eclipse.org/eclipse/downloads/drops4/I20211104-1800/testresults/html/org.eclipse.e4.ui.tests.css.core_ep422I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11.html
Changing target platform.
All working now.