Hi all,
Here is a background: we have JBoss Tools, which are plugins built
with Maven + their tests, as "eclipse-test-plugin"s, and we have
JBoss Developer Studio, which is a RCP app packaging all this stuff
together.
The use-case is: I want to execute tests from JBT against JBDS, with
Tycho. In example below, use case is I want to execute tests from
bundle "org.jboss.tools.birt.core.tests" using product
"com.jboss.jbds.product.product". Both bundle and product can be
found in the target platform or repositories/
I already know how to install and execute tests headless without
using Tycho. But we don't like it that much.
So I've tried to use the tycho-surefire-plugin on a pom file, and
use this pom + tycho-surefire-plugin configuration to invoke a test
from an external source (p2 repo) on a product from another p2 repo.
Here is what I hoped would work:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>0.15.0</version>
<executions>
<execution>
<id>testsInJBDS</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<testSuite>org.jboss.tools.birt.core.tests</testSuite>
<testClass>org.jboss.tools.birt.core.test.BirtCoreTestSuite</testClass>
<!-- Specify environment -->
<product>com.jboss.jbds.product.product</product>
<application>org.eclipse.ui.ide.workbench</application>
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>com.jboss.jbds.all</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.jboss.tools.birt.core.tests</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
That does not work, because of the following limitations I noticed:
* TestMojo makes a test on the packaging-type (must be an
eclipse-test-plugin)
* testSuite (Test Bundle) must be a MavenProject in the same reactor
as the invocation of this plugin
* testSuite (Test Bundle) must be the current project
* For a pom, there is not targetPlatformConfiguration attached
(CTX_TARGET_PLATFORM_CONFIGURATION), since
DefaultTychoDependencyResolver does not apply to non-Tycho types.
Are there known workarounds or plans to get over this limitations?
The general idea is to make tycho-surefire-plugin usable as a test
launcher in more complex scenarios.
Cheers,
|