Testing a RCP application startup problems

234 views
Skip to first unread message

M Jääskeläinen

unread,
Jun 25, 2014, 4:24:30 PM6/25/14
to robotframework-ec...@googlegroups.com
I have developed a RCP application called myapp, which is a simple graphical email client.
I have packaged and exported it using Eclipse Product Export Wizard.

I can run this application in Linux using following 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 &


Now I have problems launching this app in RF test case with SWTBot. I have followed instructions in: http://code.google.com/p/robotframework-eclipselibrary/wiki/InstallationForEclipse, because this is RCP application.

I have following shell script to run 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.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 $*


I have a RF test case that as attached (TestRCP.html) that I'm trying to run. Instead of launching myapp, it launches eclipse, so obviously I'm doing something wrong: I don't know how to call myapp correctly.

Any suggestions, how I can fix this?







TestRCP.html

Laurent Carbonnaux

unread,
Jun 26, 2014, 4:44:54 AM6/26/14
to robotframework-ec...@googlegroups.com
Hello,

Does your application is in file:/opt/eclipse/ ?
In case no, you should change this parameter in TestRCP.html in ${eclipse_install}

Regards,
Laurent


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "robotframework-eclipselibrary-users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse robotframework-eclipsel...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

M Jääskeläinen

unread,
Jun 30, 2014, 4:03:52 AM6/30/14
to robotframework-ec...@googlegroups.com


Does your application is in file:/opt/eclipse/ ?
In case no, you should change this parameter in TestRCP.html in ${eclipse_install}


Thank you for you reply Laurent.

No, my application is not /opt/eclipse/. So I tried my application binary instead of eclipse binary with Start Eclipse keyword as you advised.
I still get errors and my application does not start for test cases.

I have made a very simple RCP example app for testing purposes, that I can run in the command line:

/home/xxx/exportsampleapp/eclipse/myapp

Now I call this binary in the test case. You can see my RF test case as attachment, as well as RF start shell script.
 
But I still get error:

Expand All KEYWORD: EclipseLibrary.Start Eclipse ${myapp_install}
Documentation:

Start Eclipse with the given arguments in a separate thread

Start / End / Elapsed: 20140630 10:44:21.407 / 20140630 10:44:22.610 / 00:00:01.203
10:44:21.415 TRACE Arguments: [ u'file:/home/xxx/exportsampleapp/eclipse/myapp' ]
10:44:22.561 INFO An error has occurred. See the log file /home/xxx/workspace_eclipse_RCP/RobotFrameWorkMailApplicationTest/configuration/1404114261457.log
10:44:22.592 FAIL RuntimeException
10:44:22.595 DEBUG java.lang.RuntimeException at org.robotframework.javalib.library.AnnotationLibrary.retrieveInnerException(AnnotationLibrary.java:93) at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:75) at org.lcx.robotframework.eclipse.EclipseLibrary.runKeyword(EclipseLibrary.java:59) at robot.run$py.main$3(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/run.py:370) at robot.run$py.call_function(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/run.py) at robot.utils.application$py._execute$10(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/utils/application.py:88) at robot.utils.application$py.call_function(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/utils/application.py) at robot.utils.application$py.execute_cli$5(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/utils/application.py:45) at robot.utils.application$py.call_function(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/utils/application.py) at robot.run$py.run_cli$6(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/run.py:399) at robot.run$py.call_function(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/run.py) at robot.jarrunner$py._run$3(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/jarrunner.py:60) at robot.jarrunner$py.call_function(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/jarrunner.py) at robot.jarrunner$py.run$2(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/jarrunner.py:53) at robot.jarrunner$py.call_function(/home/peke/Devel/robotframework/tmp-jar-dir/Lib/robot/jarrunner.py) at org.robotframework.RobotFramework.run(RobotFramework.java:62) at org.robotframework.RobotFramework.main(RobotFramework.java:37) Caused by: org.lcx.robotframework.eclipse.bridge.SWTBotBridgeException at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords.startEclipseInSeparateThread(EclipseLaunchingKeywords.java:115) at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords.startEclipse(EclipseLaunchingKeywords.java:39) at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:49) at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:55) at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37) at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:73) ... 144 more


In log file:

!SESSION Mon Jun 30 10:31:03 EEST 2014 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2014-06-30 10:31:03.163
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.RuntimeException: Could not find framework
        at org.eclipse.equinox.launcher.Main.getBootPath(Main.java:1004)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:583)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords.internalLaunchEclipse(EclipseLaunchingKeywords.java:157)
        at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords.access$100(EclipseLaunchingKeywords.java:23)
        at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords$2.run(EclipseLaunchingKeywords.java:78)
        at java.lang.Thread.run(Thread.java:744)

Obviously there is something wrong with eclipse plugin to start eclipse framework. I still don't know how to fix this.
TestRCP.html
eclipsebot.sh

Laurent Carbonnaux

unread,
Jun 30, 2014, 4:48:49 AM6/30/14
to robotframework-ec...@googlegroups.com
Hello M

Could you send me your "very simple RCP example app" so that I can check what happens?

Regards,
Laurent.


--

M Jääskeläinen

unread,
Jun 30, 2014, 5:28:17 AM6/30/14
to robotframework-ec...@googlegroups.com


Could you send me your "very simple RCP example app" so that I can check what happens?


Hello, here is a link to my simple example RCP app. https://drive.google.com/file/d/0B6eEKurw8rWCeU9qMVZNMnY0Nk0/edit?usp=sharing
It's a zip file, which you can extract and run the app in eclipse/myapp.

<a href="http://aijaa.com/UzMQPM" target="_blank"><img src="http://i8.aijaa.com/t/00532/13362679.t.jpg"></a>

It just a simple example RCP app based on example templates of Vogella's e4 RCP tools in Eclipse.
The target platform for this in Linux, java 1.7. Do you need a Windows version?


Laurent Carbonnaux

unread,
Jun 30, 2014, 10:12:03 AM6/30/14
to robotframework-ec...@googlegroups.com
Hello,

First, your TestRCP.html file for sample app is not correct, install parameters are not provided correctly to RF.
It miss the -install parameter before the parameter itself.

Second, I've found in the previous TestRCP.html that you strange parameters in the launch of eclipse.
especially in ${eclipse_params}.
"-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"
You overload the classpath and the launcher.
You should first tty to launch your apps with no parameters, then add them one per one.

Let me know if it works.




Laurent Carbonnaux

unread,
Jun 30, 2014, 11:27:34 AM6/30/14
to robotframework-ec...@googlegroups.com
Hi again,

Also I see that both SWTBot et EclipseLibrary plugins are not deployed in the sample app, you may correct before retest.

Laurent

Laurent Carbonnaux

unread,
Jun 30, 2014, 1:00:18 PM6/30/14
to robotframework-ec...@googlegroups.com
Unfortunatly I cannot got deeper, since it's linux apps.
But try this test files:
TestRCP_sample.html for the sample apps
TestRCP.html for the application.

Remember to install SWTBot & RF EclipsePlugin first in both of the apps.

Laurent.
TestRCP.html
TestRCP_sample.html

M Jääskeläinen

unread,
Jun 30, 2014, 1:08:19 PM6/30/14
to robotframework-ec...@googlegroups.com


Also I see that both SWTBot et EclipseLibrary plugins are not deployed in the sample app, you may correct before retest.


Hello Laurent,

I think this might be the real problem. I didn't know those plugin need to be also deployed with sample app.
I will try to add these as dependencies to my sample app.

Thanks for the advice!

Laurent Carbonnaux

unread,
Jun 30, 2014, 2:39:51 PM6/30/14
to robotframework-ec...@googlegroups.com
Ok, let me know if it works


--

M Jääskeläinen

unread,
Jul 2, 2014, 9:22:04 AM7/2/14
to robotframework-ec...@googlegroups.com
Hello Laurent,


Also I see that both SWTBot et EclipseLibrary plugins are not deployed in the sample app, you may correct before retest. Ok, let me know if it works


now I have been able to add SWTBot and EclipseLibrary plugins to my sample project.

Now I don't get anymore the same error. So that was the real problem. But now I have still problems.

If I add the binary file of my application to "Start Eclipse" keyword (as you instructed earlier in file TestRCP_sample.html) , application does not start in RF test case.
But If I add only the installation directory and rename my application binary from myapp to eclipse, then my application starts in test case.

So this is how I'm able to start my application:
<td class="name">${myapp_install}</td>
<td>file:/home/xxx/exportsampleapp/eclipse/<td>

Now at least the application starts, but there is still no effect running any SWTBot tests on that. Nothing happens in GUI if I try to instruct to open File, click Quit etc. Test case just ends up in timeout.


1) Do I start now application correctly? I doubt.
2) Is it really requirement that application is called actually eclipse?
3) I don't think SWTBot is trying to perform anything yet in my real app.

Thank you for your help!

Laurent Carbonnaux

unread,
Jul 2, 2014, 9:55:28 AM7/2/14
to robotframework-ec...@googlegroups.com
Hello M

1/ if the application starts, that's fine!

2/ You can make another keyword that overload the Start Eclipse keyword and call it Start MyApps for example, if that was your question.
For the application binary, I don't know, the plugin search for the eclipse launcher.jar not the binary (exe in windows), so I realy don't know. I need to check further.

3/ I'm not sure what happens, but before doing an action on a widget, you have first to find it.
You can have a look on the A_TestEclipseLibrary_installation.html test case. you'll see that you always have a "find foo" before "act on foo"

L


M Jääskeläinen

unread,
Jul 2, 2014, 10:31:11 AM7/2/14
to robotframework-ec...@googlegroups.com
Hello Laurent,

I'm still wondering, which is the correct way to start RCP application in robotframework-eclipse plugin?
Is it really using "Start Eclipse" keyword or should I use "Start Application In Separate Thread" and Start SWTBotBridge?

MJ

Laurent Carbonnaux

unread,
Jul 3, 2014, 3:41:48 AM7/3/14
to robotframework-ec...@googlegroups.com
Hi M,

In fact, it's the same, "Start Eclipse" overload  "Start Application In Separate Thread".
The bridge mus always be started (and called by both of the previous keywords). The bridge make the link between RF and EclipseLibrary plugin which redirect the calls to SWTBot plugin.

BR,
Laurent


--

M Jääskeläinen

unread,
Jul 8, 2014, 8:53:38 AM7/8/14
to robotframework-ec...@googlegroups.com
Hello Laurent,

I have been tackling again receint days with trying to make this eclipse-plugin library to work.

First, I'm calling alway after start eclipse, then start SWTBotBridge, like you advised.

I have manually added SWTBot Plugin and Eclipse Plugin to my application.

Then I export application and it starts correctly in the command line.

Then I try to run RF test cases. Application then starts, but unfortunately it ends up in timeout like after 3mins. I have been debugging what's happening
during those 3mins and figured out that it's looping in class EclipseLauchingKeywords in while loop in line 100 trying to ask SWTBotBridge class if it's initialized,
but it never gets initialized.

http://aijaa.com/Z99oVs


This is log file:
DEBUG 2014/07/08 15:06:58,700 [MainThread] (EclipseLibrary.java:52) -   args:4
DEBUG 2014/07/08 15:06:58,702 [MainThread] (EclipseLibrary.java:55) -           arg[0]:-install, of class=java.lang.String
DEBUG 2014/07/08 15:06:58,704 [MainThread] (EclipseLibrary.java:55) -           arg[1]:file:/home/mkjaaske/exportsampleapp2/eclipse/, of class=java.lang.String
DEBUG 2014/07/08 15:06:58,706 [MainThread] (EclipseLibrary.java:55) -           arg[2]:, of class=java.lang.String
DEBUG 2014/07/08 15:06:58,708 [MainThread] (EclipseLibrary.java:55) -           arg[3]:-debug, of class=java.lang.String
DEBUG 2014/07/08 15:06:58,712 [MainThread] (EclipseLaunchingKeywords.java:54) - loading eclipse launcher jar
DEBUG 2014/07/08 15:06:58,715 [MainThread] (EclipseUtil.java:29) - Load Eclipse launcher jar
DEBUG 2014/07/08 15:06:58,717 [MainThread] (EclipseUtil.java:31) -       pathToEclipse=file:/home/mkjaaske/exportsampleapp2/eclipse/
DEBUG 2014/07/08 15:06:58,723 [MainThread] (EclipseUtil.java:36) -       eclipseLauncherJar=/home/mkjaaske/exportsampleapp2/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
DEBUG 2014/07/08 15:06:58,725 [MainThread] (EclipseUtil.java:74) -       file://home/mkjaaske/exportsampleapp2/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar is loaded
DEBUG 2014/07/08 15:06:58,727 [MainThread] (EclipseLaunchingKeywords.java:62) - get the Main method
INFO 2014/07/08 15:06:58,734 [MainThread] (EclipseLaunchingKeywords.java:86) - Eclipse start is requested
DEBUG 2014/07/08 15:06:58,739 [Thread-4] (EclipseLaunchingKeywords.java:155) - requesting Main method of eclipse launcher jar
ERROR 2014/07/08 15:08:58,759 [MainThread] (EclipseLaunchingKeywords.java:122) - SWTBotBridge initialization failed or timeout reached



I've been thinking that most probably this was caused by incorrectly adding SWTBot and Eclipse plugin to my application. SWTBot site anyway says that
manually adding SWTBot is NOT supported and is very errorprone.

So then I spend time developing a new sample application that is feature based and supports headless p2 provisioning like SWTBot tutorial recommends.

Then I add needed plugins and export application. And try to make p2 provisioning in command line:

If I install latest version of SWTBot successfully, then I receive then error later when I install Robot Framework Eclipse Plugin:

So I install SWTBot latest version successfully:
mkjaaske@venus:~/exportmailapp/eclipse$ java -jar plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.director -consolelog -repository $SWTBOT_SITE -installIU org.eclipse.swtbot.eclipse.test.junit.feature.group
Installing org.eclipse.swtbot.eclipse.test.junit.feature.group 2.2.1.201402241301.
Operation completed in 10174 ms.
mkjaaske@venus:~/exportmailapp/eclipse$

But then I receive error,when trying to install robotframework-eclipse-plugin:

mkjaaske@venus:~/exportmailapp/eclipse$ java -jar plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.director -consolelog -repository http://scrumvision.sourceforge.net/update-site/eclipselibrary -installIU org.lcx.robotframework.swtbotplugin
Installing org.lcx.robotframework.swtbotplugin 1.4.0.201305152223.
Installation failed.
Cannot complete the install because one or more required items could not be found.
 Software being installed: RobotFramework EclipseLibrary Plugin 1.4.0.201305152223 (org.lcx.robotframework.swtbotplugin 1.4.0.201305152223)
 Missing requirement: RobotFramework EclipseLibrary Plugin 1.4.0.201305152223 (org.lcx.robotframework.swtbotplugin 1.4.0.201305152223) requires 'bundle org.eclipse.swtbot.eclipse.core 2.0.0' but it could not be found
Application failed, log file location: /home/mkjaaske/exportmailapp/eclipse/configuration/1404820068959.log
mkjaaske@venus:~/exportmailapp/eclipse$




So then I checked the Compability page of RobotFramework EclipseLibrary Plugin and indeed there it requires SWTBot version 2.0.3.

So then I try to install old version of SWTBot 2.0.3 (SWTBot does not anymore provide any tips for old version, what should be correct -installIU parameter):

mkjaaske@venus:~/exportmailapp/eclipse$ export SWTBOT_SITE=http://download.eclipse.org/technology/swtbot/ganymede/dev-build/update-site/mkjaaske@venus:~/exportmailapp/eclipse$ java -jar plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.director -consolelog -repository $SWTBOT_SITE -installIU org.eclipse.swtbot.eclipse.test.junit.feature.group
Installation failed.
The installable unit org.eclipse.swtbot.eclipse.test.junit.feature.group has not been found.
Application failed, log file location: /home/mkjaaske/exportmailapp/eclipse/configuration/1404820372924.log
!SESSION 2014-07-08 14:52:52.457 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/technology/swtbot/ganymede/dev-build/update-site/ -installIU org.eclipse.swtbot.eclipse.test.junit.feature.group
Command-line arguments:  -application org.eclipse.equinox.p2.director -consolelog -repository http://download.eclipse.org/technology/swtbot/ganymede/dev-build/update-site/ -installIU org.eclipse.swtbot.eclipse.test.junit.feature.group

!ENTRY org.eclipse.equinox.p2.director.app 4 0 2014-07-08 14:53:02.399
!MESSAGE The installable unit org.eclipse.swtbot.eclipse.test.junit.feature.group has not been found.
mkjaaske@venus:~/exportmailapp/eclipse$


So, why RobotFramework EclipseLibrary Plugin requires so old version of SWTBot?  I can see in robotframework org.lcx.robotframework.swtbot-feature/feature.xml file that it specifies:
<import plugin="org.eclipse.swtbot.eclipse.core" version="2.0.0" match="greaterOrEqual"/>

I should not  use for development eclipse 3.5 and SWTBot 2.0.3.
If I really need to use old versions, how can I install this so old version of SWTBot to my application, because recommended way is using p2?

What step do you recommend me to take now? My goals is mainly to se evaluate this solution for testing RCP applications. 



Laurent Carbonnaux

unread,
Jul 8, 2014, 10:15:52 AM7/8/14
to robotframework-ec...@googlegroups.com
Argh!!!!

I don't know where to start.
Let's try:

1/ Since eclipse plugin access to SWTBot thru introspection, there is no known limits of version yet.
Even for Eclipse version. I am using Eclipse Kepler 4.3.0.M20130911 with SWTBot 2.2.1 on Windows 8 x64 and Java 1.7.0_51, and it works fine.

2/ Then you should add EclipsePlugin and SWTBot plugins on our Eclipse configuration thru the update manager and using the update sites.
at least all from the SWTBot - API feature, it will request updates other needed plugins in case.


3/ The application under test should be deployed with both EclipsePlugin and SWTbot.
It is done in the deployement descriptor file xxx.product at root of the project, in the Dependencies tab.
Add org.lcx.robotframework.swtbotplugin and click to "Add Required Plug-ins", it should add the SWTBot ones.

This is a configuration for test, for a production one, just copy/paste your xxx.product file and don't add ..swtbotplugin and SWTbot's ones.

4/ then deploy your application with the descriptor (the one for test) in a folder "D:\myapp" for example under windows

5/ The StartEclipse keyword will start the bridge itself, no need of other keywords, sorry if I let you think something else.
And call StartEclipse keyword like this

Set Eclipse Library Log LevelDEBUG
Start Eclipse -install
file:/D:/myapp






Hope it helps!
Really sorry for inconvenience, Eclipse is not really an easy tool, and integration with robotframework is toochy!

I'm still available for any help
Laurent.


M Jääskeläinen

unread,
Jul 8, 2014, 2:41:14 PM7/8/14
to robotframework-ec...@googlegroups.com
Hello Laurent,

thank you for your answer.
In fact, I have in my opinion just followed these steps by manually adding swtbot and eclipse plugin to my application, as you described. But as I was thinking it's not correct way (as SWTBot manual says) and causing timeout, I switched to using p2.

Is it possible to provide me a sample RCP application binary (Linux or even Windows) that I could figure out, is my application faulty or my configuration? It would be a great help.


Laurent Carbonnaux

unread,
Jul 8, 2014, 4:52:27 PM7/8/14
to robotframework-ec...@googlegroups.com
Hello,

Here is one of my test application source code project, windows one.
You can import it in your eclipse.
And some rf tests files which test this application.

Let me know if suitable.

Laurent



org.lcx.robotframework.rcp.part1.zip
TestSamples.zip

M Jääskeläinen

unread,
Jul 9, 2014, 3:37:38 PM7/9/14
to robotframework-ec...@googlegroups.com
Hello,

thank you for your help and these sample applications. It was helpfull for my debugging.

Your sample applications works fine with test cases.
Now I know what's the problem: I have been trying to test Eclipse 4 RCP application. Your application was Eclipse 3.x.

I made then example application with Eclipse 3.x style and it works great with test cases.

But indeed, if sample application is Eclipse 4, robotframework-eclipse plugin hungs, because SWTBot is never initialized and ends up in timeout as I have described earlier.

Have you tested this plugin with Eclipse 4 application to see similar problem?

Now of course the problem is that we want to test Eclipse 4 RCP application.

MJ

Laurent Carbonnaux

unread,
Jul 9, 2014, 3:52:01 PM7/9/14
to robotframework-ec...@googlegroups.com
Oh! I need to check.
Did you try to deploy the sample application as an Eclipse 4 RCP on your side?

I'll test and let you know

Laurent.


Laurent Carbonnaux

unread,
Jul 9, 2014, 4:25:43 PM7/9/14
to robotframework-ec...@googlegroups.com
Hello again,

I've just recompile the sample apps to Eclipse 4 RCP and it works fine for me.
I need to investigate more.
Also, if it's possible of course, could you send me your application project so that I may have a look on what's going on?

M Jääskeläinen

unread,
Jul 10, 2014, 3:08:53 AM7/10/14
to robotframework-ec...@googlegroups.com
Hello,

so here are the step, how I have create my sample E4 RCP application:

In Eclipse Kepler Linux 64bit:
  • File -> New Other ...-> Eclipse 4 -> Eclipse 4 application Project
  • I fill the project name, select generate Activator, "create sample content", otherwise default settings 
  • Project is created, I'm able to to run it from *.product Overview tab "Lauch Application".
  • Then I go to *.product files dependencies tab and add following plugins:
    • org.eclipse.swtbot.swt.finder
    • org.eclipse.swtbot.eclipse.finder
    • org.hamcres.core
    • org.hamcres.library
    • org.junit
    • org.apache.log4
    • org.lcx.robotframework.eclipseplugin
  • The I select in dependencies page "Add required plugins"
  • Then I run application again in Overview tab (no errors) and I export it with default settings in "Exlipse product export wizard" in Overview page.

I have zipped my example application here: https://drive.google.com/file/d/0B6eEKurw8rWCcFR3UFg4QkZrc1U/edit?usp=sharing

And running this application ends up in timeout in test cases.
And like I said, it I just create Eclipse 3.x RCP application (different procedure), then it works fine with test cases.

MJ

Laurent Carbonnaux

unread,
Jul 10, 2014, 2:05:53 PM7/10/14
to robotframework-ec...@googlegroups.com
Hello M,

Now I can reproduce the problem!!! I can see the light ;-)
I don't what is specific with E4 way of working.

Let me take some time to check what happens.

cheers,
L



--

Laurent Carbonnaux

unread,
Jul 10, 2014, 5:17:24 PM7/10/14
to robotframework-ec...@googlegroups.com
Hi,

After first investigation, it seams that standards API of SWTBot doesn't support E4 applications.
I have to check if another SWTBot version or extension can resolve it.

I'll keep you informed.

L

mkja...@naturebebe.fi

unread,
Jul 11, 2014, 5:06:56 AM7/11/14
to robotframework-ec...@googlegroups.com
Hello Laurent,

thank you again for your help. Where do you see that SWTBot API does not support E4? I have been reading of course SWTBot manuals / user groups, but I don't find any reference that SWTBot API say anything about only supporting E3.x.

MJ
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse robotframework-eclipselibrary-users+unsubscribe@googlegroups.com.

Laurent Carbonnaux

unread,
Jul 11, 2014, 5:50:22 AM7/11/14
to robotframework-ec...@googlegroups.com
Hi M,

You're right, SWTBot says it support E4.
But at the moment, I dont' know how, since SWTbot search for a Display which E4 doesn't use it.
What happens is that the eclipselibrary starts, but when it try to start SWTBot it doesn't work because SWTBot don't find the Display.
I'm investigating how to resolve it.



Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse robotframework-eclipsel...@googlegroups.com.

M Jääskeläinen

unread,
Jul 11, 2014, 6:16:06 AM7/11/14
to robotframework-ec...@googlegroups.com
Hello Laurent,



You're right, SWTBot says it support E4.
But at the moment, I dont' know how, since SWTbot search for a Display which E4 doesn't use it.
What happens is that the eclipselibrary starts, but when it try to start SWTBot it doesn't work because SWTBot don't find the Display.
I'm investigating how to resolve it.

I can see this same behaviour.
If I call "start application in a separate thread" keyword, test case ends up in java runtime exception "can't find Display".
But if I call "start eclipse" (eclipse actually being my binary), test case times out (SWTBot never initialized).

I'm leaving now for a holiday, I'll continue testing then. I hope this would be easy to fix.

MJ


 
Reply all
Reply to author
Forward
0 new messages