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/Z99oVsThis 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 foundApplication 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.