We are writing SWTBot tests for our Eclipse RCP application. Our RCP application includes NatTable components and has authorization mechanism to enable/disable perspectives. The test suite is working fine when launching it from Eclipse. Now we are trying to integrate it with Tycho.
This is the pom.xml created for running the SWTBot test suite:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.test</groupId>
<artifactId>com.test.demo.client.gui</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.tsystem.demo.client.gui.swtbot.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>0.20.0</version>
<configuration>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<!-- launch our product and application in the tests -->
<product>com.test.demo.client.gui.ui.product</product>
<application>com.test.demo.client.gui.ui.application</application>
</configuration>
</plugin>
</plugins>
</build>
</project>
When we execute the Tycho build to launch the SWTBot test suite, we are getting below error:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.20.0:test (default-test) on project com.tsystem.rvs.client.gui.swtbot.test: An unexpected error occured (return code -1). See log for details. -> [Help 1]
My first question is how Tycho can execute tests on our RCP application without first creating a product? I have tried few samples, and in those samples the test suite is executed before creating the product. We have custom configuration for splash screen, login mechanism to server, so is there additional configuration require to launch swtbot test suite. We have tried to launch RCP application with one perspective and view and it works fine with tycho but in our case tycho is not able to launch the application. There is no log file created under target/data and configuration as well.
Can someone explain from where Tycho takes the plugins to launch the application if the product is created after the execution of the SWTBot test suite?