Please be very careful with having the Junit container before the plugin dependencies in the classpath. That can lead to preferring API from the junit container during Eclipse
compilation, and getting compile errors later in Tycho (if there are different versions of jars in those 2 classpath entries). I experienced that last year and have since enforced the Junit container to be the last (non output) entry in the classpath file
for my projects.
Mit freundlichen Grüßen / Best regards
Michael Keppler
LTO Release Engineering (ETAS/ESW-CI)
Tel. +49 711 3423-2429 | Fax +49 711 89661-0 |
Michael.Keppler@xxxxxxxx
Von: tycho-user <tycho-user-bounces@xxxxxxxxxxx>
Im Auftrag von Fauth Dirk (XC-ECO/ESM1)
Gesendet: Mittwoch, 17. Februar 2021 06:46
An: Tycho user list <tycho-user@xxxxxxxxxxx>
Betreff: Re: [tycho-user] Junit5 tests no longer found with Tycho 2.2
Not sure if this fixes your issues, but when I started migrating to JUnit 5 I also faced some weird issues. Maybe because I have JUnit 4 tests running at the same time as JUnit5.
I followed this wiki page:
https://wiki.eclipse.org/Tycho/How_Tos/JUnit5
Then I executed the following steps:
- add JUnit5 library to project build path
- add the following packages to Imported-Packages to be able to run JUnit4 and JUnit5 tests from within the IDE and via Tycho
- org.junit (4.12.0)
- org.junit.jupiter.api (5.1.0)
- Ensure that the JUnit5 library is above the Plug-in Dependencies in the build path
Especially the last step, checking the position of the JUnit5 library in the build path, took me a while and fixed some issues. I can’t remember the exact issues so I don’t know
if this helps you. But I wanted to share it so you can check if you are facing a similar issue.
Mit freundlichen Grüßen / Best regards
Dirk Fauth
Cross-Domain Computing Solutions, Cross Automotive Platforms - System, Software and Tools Engineering Engineering Software Methods and Tools1 (XC-ECO/ESM1)
Robert Bosch GmbH | Postfach 30 02 40 | 70442 Stuttgart |
GERMANY | www.bosch.com
Tel. +49 711 811-57819 | Telefax +49 711 811 |
Dirk.Fauth@xxxxxxxxxxxx
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner,
Prof. Dr. Stefan Asenkerschbaumer, Filiz Albrecht, Dr. Michael Bolle, Dr. Christian Fischer,
Dr. Stefan Hartung, Dr. Markus Heyn, Harald Kröger, Rolf Najork, Uwe Raschke
Von: tycho-user <tycho-user-bounces@xxxxxxxxxxx>
Im Auftrag von Felix Dorner
Gesendet: Dienstag, 16. Februar 2021 17:18
An: Tycho user list <tycho-user@xxxxxxxxxxx>
Betreff: Re: [tycho-user] Junit5 tests no longer found with Tycho 2.2
org.apache.maven.surefire.util.SurefireReflectionException:
java.util.ServiceConfigurationError:
org.junit.platform.engine.TestEngine:
org.junit.jupiter.engine.JupiterTestEngine not a subtype
Well hello, you sound familiar. I fixed that one yesterday, but don't remember how :/