Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to configure tycho-surefire to run in the test phase?

I haven't done a lot with Maven, but I understand the basics. We're using Tycho to build RCP plugins and I'm wondering why Tycho uses the integration-test phase to execute the tests in a bundle.

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

If so, how?

like image 834
Byebye Avatar asked Feb 25 '15 14:02

Byebye


People also ask

What is perCoreThreadCount?

Note that the perCoreThreadCount is a "multiplier" of a sorts. With this parameter set to true (the default value), you will get the specified number of threads per CPU core. Also note that in this specific case threadCountSuites=2 has the same effect as threadCount=2 , since we are using parallel=suites .

What is Tycho Maven plugin?

The Tycho Maven Plugin provides extensions to build Eclipse projects. Tycho POM Generator Plugin. The tycho-pomgenerator-plugin provides tools for integrating Maven, Eclipse and OSGi. Tycho Surefire Parent. Tycho integrates Maven with Eclipse and OSGi.

What is Tycho Eclipse?

Eclipse Tycho™ is focused on a Maven-centric, manifest-first approach to building Eclipse Platform plug-ins, features, update sites, RCP applications and OSGi bundles. Tycho is focused on a Maven-centric, manifest-first approach to building Eclipse plug-ins, features, update sites, RCP applications and OSGi bundles.

What is Tycho build?

Tycho is a set of Maven plug-ins for building Eclipse plug-ins, features, products and OSGi bundles. A Tycho build is configured via one or multiple pom. xml files. You need at least one pom file for configuring the Tycho configuration.


Video Answer


1 Answers

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.

like image 124
oberlies Avatar answered Oct 13 '22 11:10

oberlies