Can someone explain where Tycho gets the plugins to run the application if the product is created after the SWTBot test suite?
This is a good question, and it is approaching the root cause of your problem.
But first, we need to clarify the term "product." Unfortunately, this can mean two different things: βProductβ can mean expanding to the extension point org.eclipse.core.runtime.products or the product configuration file ( *.product ). For tests, only product extension is important.
Similarly for applications there is an extension point org.eclipse.core.runtime.applications .
So, so that your test can use your product and application, the test runtime must contain plugins that determine the extension of the product and application. (Extensions of extension points are defined in plugin.xml plugins.) In Eclipse, this usually happens automatically, because Eclipse includes all plug-ins from the workspace in the test version. However, Tycho - without a working space concept - the test runtime contains only the test plugin and all its transitive dependencies. Your test plugin does not seem to depend on the plug-in defining the product and application, which is why this test is not executed. (BTW, /target/work/configuration/config.ini lists all the plugins in the test environment created by Tycho.)
So, to add plugins with the extension of the product and application to the test version, you can
- add dependency for example.
Require-Bundle to them in the manifest of the test plugin, - or configure the
extraRequirements of the test plug-in project as described here .
Additional error information: The error "return code -1" is caused by the <application> setting, which is undefined in the test runtime.
Setting an unknown <product> will not prevent the test from starting. In this case, the only visible effect may be the "Product xxx.product.id could not be found" log /target/work/data/.metadata/.log
PS: Starting with Tycho 0.22.0, there is a much more explicit error message if the application is configured to undefined in the test runtime:
Could not find application "xyz" in test version. Make sure the test version includes the package that defines this application.
oberlies
source share