|[tycho-user] Understanding how Tycho Resolves the Target Platform used for UI JUnit Tests in Multi-Module Builds|
I am trying to understand how (when an eclipse-test-plugin configured to run UI Tests is invoked) Tycho resolves the target platform plugins to be used in the tests. I am running against Eclipse Luna with Tycho 0.22.
I have a multi-module build, such as:
pom.xml (top level build and parent pom)
- - com.cisco.<pluginX>
- - com.cisco.<pluginY>- - com.cisco.<pluginY>.ui
- - com.cisco.<pluginZ>
- - com.cisco.<pluginZ>.test
- - ...
- - …
When I run the build from the top level, everything compiles just fine, features and update site are built without problem, and most tests run just fine. However, I have one UI test that relies on behavior of Tigerstripe which fails with such an error that I am lead to believe Tigerstripe is not part of the target platform. Both my source code and test code depends on Tigerstripe, and both compile and build fine. When I run the test as a JUnit Plugin within my workbench the test runs and passes as I expected, but when invoked by Tycho it fails.
The test plugin has about a dozen dependencies listed in the Manifest as Required Plugins.
I have:org.eclipse.equinox.ds (read some posts that suggested adding this, so decided to try it)
org.eclipse.equinox.event (for errors being shown in the test workbench .log related to Eclipse 4.4)
And finally several com.cisco.<plugin*> references, 2 which come from P2 update sites, and 6 from the build itself.
I added -DdebugPort=5005 and paused the test execution to inspect the com.cisco.<plugin>.test/target folder when the test is invoked. I found a few interesting things, but I am not really sure how to interpret the information.
First off, I found that the target/work/configuration/config.ini file only contains a comment with the build timestamp:
#Fri Apr 10 12:13:19 PDT 2015
Second, I found that the target/work/plugins directory only contains a small subset of the required plugins that were listed in the manifest of the test project:
drwxr-xr-x 8 danijoh2 staff 272 Apr 10 12:13 com.cisco.xmp.<plugin1>_184.108.40.206504101202 (from P2 site)
drwxr-xr-x 9 danijoh2 staff 306 Apr 10 12:13 com.cisco.xmp.<plugin2>_220.127.116.11504101202 (from P2 site)
drwxr-xr-x 10 danijoh2 staff 340 Apr 10 12:13 org.eclipse.jdt.debug_3.8.102.v20150115-1323
drwxr-xr-x 16 danijoh2 staff 544 Apr 10 12:13 org.eclipse.m2e.archetype.common_18.104.22.16850109-1819
drwxr-xr-x 11 danijoh2 staff 374 Apr 10 12:13 org.eclipse.m2e.maven.indexer_22.214.171.12450109-1819
drwxr-xr-x 8 danijoh2 staff 272 Apr 10 12:13 org.eclipse.m2e.maven.runtime.slf4j.simple_126.96.36.19950109-1819
drwxr-xr-x 7 danijoh2 staff 238 Apr 10 12:13 org.eclipse.m2e.maven.runtime_188.8.131.5250109-1819
I was expecting to see the com.cisco.<pluginX/Y/Z>, org.eclipse.tigerstripe.workbench.base, and org.eclipse.equinox.* plugins listed in this directory, or somehow otherwise referenced by the config.ini, but there is nothing.
My top level POM is configured with tycho-maven-plugin (source/target=1.6), tycho-compiler-plugin, tychco-packaging-plugin (strictVersions=false), tycho-source-plugin (plugin-source goal), and the target-platform-configuration is:
My test project POM is configured with the tycho-surefire-plugin:
Any help offered in getting my tests to run with the correct target platform configuration is greatly appreciated!
Back to the top