Community
Participate
Working Groups
Currently, it is not possible to add JUnit4 tests to org.eclipse.equinox.p2.tests. While it is possible to include a junit4 test in an junit3 suite (using the JUnit4TestAdapter [1]), these test will not execute because the javacTarget=jsr14 setting strips the @Test annotations. Junit4 brings a ton of new, useful features (e.g. Rules) which should be available to efficiently write tests. As far as I am aware, it is sufficient to change the output class format for org.eclipse.equinox.p2.tests from jsr14 to 1.5. While Equinox may need to run on 1.4, I don't see why the tests have to. From what I could find here [2], the p2 tests are only executed on 1.5 and 1.6 VMs anyway. [1] http://junit.sourceforge.net/ [2] http://download.eclipse.org/eclipse/downloads/drops/S-3.8M2-201109151308/testResults.php
Changed with 4f57e452. Let's see what the nightly build brings...
Changing the class format of o.e.e.p2.tests seems to have worked in the central build: http://download.eclipse.org/eclipse/downloads/drops/I20111027-1300/testresults/html/org.eclipse.equinox.p2.tests_linux.gtk.x86_6.0.html I should now be possible to write junit4 tests in that bundle (see description).