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
–°olleagues


I observe an issue when I try to run SWTBot test suite from command line.
As started info I use this page : https://wiki.eclipse.org/SWTBot/Automate_test_execution#With_Ant_or_Command-Line

My ant script is
<project name="testsuite" default="run-swtbot-test" basedir=".">
	<property file="${basedir}/build.properties"/>
	<property name="temp.workspace" value="${basedir}"/>
	<property name="plugin.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.country=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">
		<tstamp/>
		<delete>
			<fileset dir="${rcp.gui.home}" includes="org*.xml"/>
		</delete>
	</target>
	<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="${plugin.name}"/>
			<property name="classname" value="org.eclipsecon.swtbot.flexprod.rcpgui.automation.administration.Create2TemplatesWithuniqueMatno" />
			<property name="vmargs" value=" -Xms512M -Xmx512M -XX:MaxPermSize=256M ${jvmOption}" />
		</ant>
	</target>
	<target name="cleanup"/>
</project>


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

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
!STACK 1
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.equinox.app.error, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, 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.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
	at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
	at org.eclipse.core.launcher.Main.main(Main.java:34)


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
Member
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?

Patrick
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