Tycho executes tests in an OSGi container, and this requires that the compiled classes are already packed as OSGi bundles. Packing only happens in the package
phase, so the tests need to be executed later. Therefore, the tycho-surefire-plugin
by default executes tests in the integration-test
phase.
If you can run your tests as "JUnit Test" in Eclipse (instead of as "JUnit Plug-in Test"), then your code and none of your dependencies require an OSGi container. In this case, you may also be able to run the tests with the maven-surefire-plugin
. This plugin by default runs in the test
phase. I've found this blog that describes the configuration which is necessary to do this.
eclipse-test-plugin
packaging type. – Mudcat