Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Run SWTBot test in Headless mode. RCP application is not started
Run SWTBot test in Headless mode. RCP application is not started [message #1782656] Tue, 27 February 2018 12:28 Go to next message
Alex Gor is currently offline Alex GorFriend
Messages: 127
Registered: November 2014
Location: Russia
Senior Member

I observe an issue when I try to run SWTBot test suite from command line.
As started info I use this page :

My ant script is
<project name="testsuite" default="run-swtbot-test" basedir=".">
	<property file="${basedir}/"/>
	<property name="temp.workspace" value="${basedir}"/>
	<property name="" value="org.eclipsecon.swtbot.flexprod.rcpgui.automation"/>
	<property name="os" value="win32"/>
	<property name="ws" value="win32"/>
        <property name="arch" value="x86"/>
        <property name="eclipse-home" value="${rcp.gui.home}"/>
        <property name="jvmOption" value="-Djava.util.Arrays.useLegacyMergeSort=true -Duser.language=en -Duser.variant=DE -cp ${rcp.gui.home}/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar org.eclipse.core.launcher.Main -wsurl https://xxxx.xxxx.xxxx:XXXXX/guisrv/services/ -uurl http://xxxx.xxxxx.xxxx/" />

	<property name="library.file" value="${basedir}/library.xml"/>
	<target name="init-suite">
			<fileset dir="${rcp.gui.home}" includes="org*.xml"/>
	<target name="run-swtbot-test" depends="init-suite">
		<ant target="swtbot-test" antfile="${library.file}" dir="${rcp.gui.home}">
			<property name="testApplication" value="com.tsystems.ths.flexprod.rcp.application"/>
			<property name="data-dir" value="${temp.workspace}"/>
			<property name="plugin-name" value="${}"/>
			<property name="classname" value="org.eclipsecon.swtbot.flexprod.rcpgui.automation.administration.Create2TemplatesWithuniqueMatno" />
			<property name="vmargs" value=" -Xms512M -Xmx512M -XX:MaxPermSize=256M ${jvmOption}" />
	<target name="cleanup"/>

The issue is :
- the script started ,
- the initiating of eclipse platform started,

RCP application, that should be tested, not started. The following error message is saved in log

!ENTRY org.eclipse.osgi 4 0 2018-02-22 19:31:06.741
!MESSAGE Anwendungsfehler
java.lang.RuntimeException: Die Anwendung {0} konnte nicht in der Registry gefunden werden. The verf√ľgbaren Anwendungen sind: com.tsystems.ths.flexprod.rcp.application, org.eclipse.ant.core.antRunner,,,,, org.eclipse.update.core.standaloneUpdate, org.eclipse.update.core.siteOptimizer, com.tsystems.ths.administration.application, Com.tsystems.ths.exporter.application, com.tsystems.ths.flexprod.rdqs.application, com.tsystems.ths.imp.application, com.tsystems.ths.ipp.application, com.tsystems.ths.mdac.application, com.tsystems.ths.monitoring.application, com.tsystems.ths.productionmonitoring.application, com.tsystems.ths.tasklist.application
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.equinox.launcher.Main.invokeFramework(
	at org.eclipse.equinox.launcher.Main.basicRun(
	at org.eclipse.equinox.launcher.Main.main(
	at org.eclipse.core.launcher.Main.main(

As I understood this message. Build cannot find Application ID of Application that should be started. Actually the application with id com.tsystems.ths.flexprod.rcp.application should be run. This ID is passed by script but not found by eclipse platform. We can see this application id in list of possible application id.

Could you please help me to resolve this issue?

Also second question is : on page that mentioned above I found that SWTBot headless test execution is not tested under Windows. Is this piece of information correct right now, or not ?

[Updated on: Tue, 27 February 2018 12:57]

Report message to a moderator

Re: Run SWTBot test in Headless mode. RCP application is not started [message #1782750 is a reply to message #1782656] Wed, 28 February 2018 22:18 Go to previous message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 53
Registered: July 2009
Hi Alex,

I'm not familiar with running SWTBot with ant, but about the application id, it appears that the error message string was not translated properly in German, the binding {0} was probably single-quoted as '{0}' which escapes the binding, it should be double-quoted as ''{0}'' or "{0}", or not quoted at all.

Try removing the user.variant=DE to see if you can get the correct missing application id?

Previous Topic:Automated test execution without showing display
Next Topic:SWTBot and E4 RCP Applications - Status?
Goto Forum:

Current Time: Wed Sep 19 13:08:22 GMT 2018

Powered by FUDForum. Page generated in 0.01945 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top