Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Open SWTBot test Recorder with custom RCP application
Open SWTBot test Recorder with custom RCP application [message #1734430] Wed, 08 June 2016 11:03 Go to next message
Alessio Pollero is currently offline Alessio PolleroFriend
Messages: 74
Registered: August 2011
Member
Hi,
I'm trying to setup a custom RCP application to have the SWTBot test Recorder window opened at the application start as shown in this video, the problem is that even if I put the
-Dorg.eclipse.swtbot.generator.enable=true
property in the VM arguments of the debug configuration, the window of the test recorder is not opened at the application startup.

I've tried putting all the jars related to the swtbot plugin inside my target platform, but it doesn't change the situation and at the startup I don't get any SWTBot test Recorder window.

Even trying installing it with this command line(as described in this tutorial) :
java -jar plugins\org.eclipse.equinox.launcher_1.2.0.20120516.jar -application  org.eclipse.equinox.p2.director -repository http://download.eclipse.org/technology/swtbot/releases/latest/ -installIU org.eclipse.swtbot.generator


doesn't work and produce this exception :

java.lang.RuntimeException: Application "org.eclipse.equinox.p2.director" could not be found in the registry.


As already said previously I'm developing against a custom target platform. Is it possible to add the plugin inside the Plug-ins section of the debug configuration ? I can only select plugins from the workspace and from the target platform.

Trying to add the update site of the SWTBot inside the target platform gives me an error trying to resolve dependencies and I can't continue in the process .

Does anyone has an idea on how to add the SWTBot plugin to this custom RCP app ?

Thanks.
Re: Open SWTBot test Recorder with custom RCP application [message #1735031 is a reply to message #1734430] Tue, 14 June 2016 19:29 Go to previous message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 84
Registered: July 2009
Member
Hi Alessio,

I tried it and got this working with a RCP application.

1) Added "-Dorg.eclipse.swtbot.generator.enable=true" to VM arguments in Run Configuration

2) Added the SWTBot Test Recorder & Code Generator feature to my target platform:
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.swtbot.generator.feature.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/technology/swtbot/snapshots"/>
</location>


3) Added these 4 plug-ins to the Run Configuration :
org.eclipse.swtbot.generator
org.eclipse.swtbot.generator.jdt
org.eclipse.swtbot.generator.rules.workbench
org.eclipse.swtbot.generator.ui


4) Clicked "Add Required Plug-ins" in Run Configuration
Check with "Validate Plug-ins". If any required plug-ins are missing, maybe something else needs to be added to your target platform.

When I launch my RCP, the recorder dialog is shown.

Patrick
Previous Topic:Recorder/Generator for non RCP app
Next Topic:Nebula Grid and SWTBot
Goto Forum:
  


Current Time: Tue Mar 19 11:26:19 GMT 2024

Powered by FUDForum. Page generated in 0.02139 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top