Is it possible to configure tycho-surefire to run during the testing phase?

I haven’t done much with Maven, but I understand the basics. We use Tycho to create RCP plugins, and I wonder why Tycho uses the integration-test phase to run the tests in the kit.

Is it possible to associate some types of tests with the test Maven phase for Tycho instead of the integration-test phase?

If so, how?

+5
source share
1 answer

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.

+6
source

Source: https://habr.com/ru/post/1214174/


All Articles