Tycho runs the tests in the OSGi container, and this requires that the compiled classes are already packaged in OSGi packages. Packaging takes place only in the package phase, so tests must be completed later. Therefore, the tycho-surefire-plugin runs tests by default in the integration-test phase.
If you can run tests like "JUnit Test" in Eclipse (instead of "JUnit Plug-in Test"), then your code and none of your dependencies require an OSGi container. In this case, you can also run tests using the maven-surefire-plugin . This plugin works by default in the test phase. I found this blog that describes the configuration that is needed for this.
source share