Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Headless run of RCP application with parameters
Headless run of RCP application with parameters [message #640491] Mon, 22 November 2010 05:29 Go to next message
Sébastien  Gandon is currently offline Sébastien Gandon
Messages: 172
Registered: July 2009
Senior Member
Hello,
I have looked at different post here on headless execution of SWT bot test.
Looked at the wiki using the swtbot application : org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
, and looked at bonita's blog http://www.bonitasoft.org/blog/eclipse/swtbot-my-new-friend/
but could not find any information on how to pass parameters to my own RCP application ?
What is the command line parameter to add to specify parameters to my hown application ?

I have also managed to launch SWT Bot test from the Eclipse Junit Plug-in test without the need of SWTBot execution type. Do we really need the headless swtbot framework and this org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion application ??
Why do not use the JUnit headless execution ?

Thanks.
SeB.
Thanks.
Re: Headless run of RCP application with parameters [message #640498 is a reply to message #640491] Mon, 22 November 2010 05:50 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 745
Registered: July 2009
Location: Grenoble, France
Senior Member
Hello,

> I have looked at different post here on headless execution of SWT bot test.
> Looked at the wiki using the swtbot application :
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> , and looked at bonita's blog
> http://www.bonitasoft.org/blog/eclipse/swtbot-my-new-friend/
> but could not find any information on how to pass parameters to my own
> RCP application ?

I've never used parameters for our own RCP app. Here is the command-line we use to start our tests:
java -jar plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion -testPluginName org.bonitasoft.studio.diagram.test -testApplication org.bonitasoft.studio.application.application -className org.bonitasoft.studio.diagram.test.AllSWTBotTests formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,junit-results-swtbot.xml -nl en -consoleLog -Xms40m -Xmx348m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=AllSWTBotTests.hprof -Dbonita.noregister=1
Have you tried to use the same argument as for standard headless junit application (if it exists)?

> What is the command line parameter to add to specify parameters to my
> hown application ?

Don't know

> I have also managed to launch SWT Bot test from the Eclipse Junit
> Plug-in test without the need of SWTBot execution type. Do we really
> need the headless swtbot framework and this
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> application ??
> Why do not use the JUnit headless execution ?

I think you can use JUnit launcher to run your SWTBot tests, but SWTBot provides some test runners to take screenshots of the application when a test fails. This is sometimes useful, and you need to use the SWTBot launcher to leverage this feature.

HTH,
--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/BPM_download.php
Re: Headless run of RCP application with parameters[SOLVED] [message #640807 is a reply to message #640491] Tue, 23 November 2010 04:15 Go to previous message
Sébastien  Gandon is currently offline Sébastien Gandon
Messages: 172
Registered: July 2009
Senior Member
Thanks Michael,
I have manage to add the application arguments by simply placing then on the command line before the vm arguments like any other arguments and it works fine.
Previous Topic:[GEF] Mouse Events should be triggered on FigureCanvas
Next Topic:SWTBot cannot handle login dialog
Goto Forum:
  


Current Time: Sat Aug 30 00:31:16 EDT 2014

Powered by FUDForum. Page generated in 0.01654 seconds