I have developed a standalone Eclipse RCP application called myapp. I have packaged and exported it using Eclipse Product Export Wizard.
I can run my RCP application in Linux in the shell script:
#!/bin/sh
java -Dfile.encoding=UTF-8 -classpath /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar org.eclipse.equinox.launcher.Main -launcher /opt/eclipse/eclipse -name Eclipse -showsplash 600 -product myapp.product -data /home/xxx/workspace_eclipse_RCP/../runtime-myapp -configuration file:/home/xxx/workspace_eclipse_RCP/.metadata/.plugins/org.eclipse.pde.core/myapp/ -dev file:/home/xxx/workspace_eclipse_RCP/.metadata/.plugins/org.eclipse.pde.core/myapp/dev.properties -os linux -ws gtk -arch x86_64 -nl en_US -consoleLog &
This starts my RCP application is Linux.
Now I'm totally stucked, how to launch and test this application in Robotframework. Out of 2 ways, I have followed instructions in
Install Eclipse Library for Eclipse RCP/SWT application. I have successfully installed and executed the
Test installation test case.
Now I have created following shell script to call RF:
#!/bin/sh
export CLASSPATH=/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
export ECLIPSE_LIBRARY=lib/eclipselibrary-0.18-with-dependencies-swt.jar
java -Xms256m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=256M -Xbootclasspath/a:$CLASSPATH:$ECLIPSE_LIBRARY -jar lib/robotframework-2.7.7.jar --debugfile jybot.log --loglevel TRACE --outputdir results $*
You notice that I use eclipselibrary-0.18-with-dependencies-swt.jar instead of
eclipselibrary-0.18-with-dependencies.jar. If I use eclipselibrary-0.18-with-dependencies.jar
, I get error ClassNotFound: SWTBotService. Tha'ts why I took then eclipselibrary-0.18-with-dependencies-swt.jar file. Is this correct?
I have RF test case (testRCP.html) that is here as attachment. That test case tries just to start myapp RCP application. I'm doing something abviously wrong, because Eclipse starts instead of myapp.
What I'm doing wrong? How can I call a standalone RCP application in RF test case? Should I actually follow the other way:
Install for Java/SWT application, because I need to run java command?
Any help appreciated.