Community
Participate
Working Groups
JUnit 5.8.1 now supports the @Suite annotation for a class with additional annotations such as @SelectClasses, @SelectPackages, @SuiteDisplayName.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187217
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187237
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/187238
The module org.junit.platform.suite.engine has been newly added in JUnit 5.8.1 and needs to be added for JDT code to run testsuites using the @Suite annotation provided in org.junit.platform.suite.api. The module will need to be added to PDE as well. I based the gerrit changes on Noopur's changes for bug 576389. Adding Vikas in cc to check and update at the same time. First gerrit below (187217) was a WIP which I have removed. There were no Orbit changes from the last JUnit 5.8.1 addition of junit.platform.suite.commons so I didn't make any forceQualifierUpdate.txt changes to equinox or platform.commons
Adding Julian also in cc as Vikas is away this week.
> I have it working for "Run as Junit Test", but I can't get it working for "Run > as Junit Test Plugin". In the 2nd case it finds the junit-platform-suite-engine > but cannot find another test engine. I have tried adding junit-jupiter-engine > to the plug-in's .classpath, it's dependencies, and as a JVM parameter for the > launch configuration, but still I get a message that the > junit-platform-suite-engine did not find another test engine. That is a bug in PDE. It only correctly adds all bundles containing TestEngines to the test classpath, when the test is launched with -runasjunit5 (RemotePluginTestRunner::main). That's only the case for tests containing @RunWith(JUnitPlatform.class). I assume this behavior also breaks third-party TestEngines. I think we should remove this argument and always add those bundles to the classpath. That seems to work fine at first glance. Once org.junit.platform.suite.engine is available in an I-Build I can fix that.
(In reply to Julian Honnen from comment #6) > > I have it working for "Run as Junit Test", but I can't get it working for "Run > > as Junit Test Plugin". In the 2nd case it finds the junit-platform-suite-engine > > but cannot find another test engine. I have tried adding junit-jupiter-engine > > to the plug-in's .classpath, it's dependencies, and as a JVM parameter for the > > launch configuration, but still I get a message that the > > junit-platform-suite-engine did not find another test engine. > > That is a bug in PDE. It only correctly adds all bundles containing > TestEngines to the test classpath, when the test is launched with > -runasjunit5 (RemotePluginTestRunner::main). That's only the case for tests > containing @RunWith(JUnitPlatform.class). I assume this behavior also breaks > third-party TestEngines. > > I think we should remove this argument and always add those bundles to the > classpath. That seems to work fine at first glance. > > Once org.junit.platform.suite.engine is available in an I-Build I can fix > that. Thanks Julian. I have updated the eclipse-sdk-prereqs.target patch as it had a merge conflict due to another patch merged for updating ant. Are you able to review that patch or should we wait and leave it for Vikas?
I think you also need to add the bundle to the jdt feature.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/187238 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=d73935cdcb52f128b4b8db78c1c745d61c51779f
Unfortunately Eclipse SDK tests cannot use Junit 5, see Bug 531057.
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/187392
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187237 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=abbfa66d4b1520c9344efbfaf74b22e759f8ef57
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt/+/187496
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt/+/187496 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.git/commit/?id=56dc8fed5147bf75dd4619f4b7ef7107907f5d3f
(In reply to Eclipse Genie from comment #14) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt/+/187496 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.git/commit/?id=56dc8fed5147bf75dd4619f4b7ef7107907f5d3f Added org.junit.platform.suite.engine to JDT feature.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt/+/187516
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187528
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187528 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=b1ebfbadb6953ca4946354dd181423da33694be5
(In reply to Eclipse Genie from comment #18) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187528 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=b1ebfbadb6953ca4946354dd181423da33694be5 +1 for the JDT part to be included in RC1.
Gerrit change https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/187392 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=db0ba49ae4fc62da313310ce877ee0153da5301c
@Jeff can this bug be closed now? If so, please resolve this bug.
Released for 4.22 RC1
Verified for 4.22 RC2