Open SWTBot test Recorder with Eclipse RCP application

887 views Asked by At

I want to use SWTBot Test Recorder with my Eclipse RCP Application but the SWTBot recorder doesn't start with my application, when I try to run it.

What I've done with Eclipse:

File > New > Other > Run Test Recorder > Record Test Senario on another RCP Application

Configuration:

  • VM: -Dorg.eclipse.swtbot.generator.enable=true
  • Run a Product: My Application
  • I have the plugins for SWTBot

Run >>> My application start without SWTBot Test Recorder


I have already seen this post https://www.eclipse.org/forums/index.php?t=msg&th=1078197&goto=1734430&#msg_1734430 and it doesn't work for me. SWTBot Test Recorder can start with Eclipse IDE.

Thank you,

Antoine

2

There are 2 answers

1
ACV On

This post should help:

https://www.eclipse.org/forums/index.php?t=msg&th=1078197&goto=1734430&#msg_1734430

It worked for me. You need to make sure you add the plugins to the target platform (Window->Preference->Plugin Development->Target Platform)

0
Eppman On

Same issue here. All releated plug-ins for SWTBot selected in Run Configuration and I have VM arguments: -Dorg.eclipse.swtbot.generator.enable=true but SWTBot Recorder Dialog will not open with RCP app launching.

Workaround that worked for me: Start the SWTBot Recorder Dialog programmatically from one of your plug-ins: see https://wiki.eclipse.org/SWTBot/Generator#Programatically.2C_from_a_plugin

  1. add all SWTBot plug-ins to your Plugin from which you want to start the SWTBot Recorder programmatically
  2. add following Import to your class from which to start the Dialog: import org.eclipse.swtbot.generator.ui.StartupRecorder;

  3. the following Code opens the Recorder window: StartupRecorder.openRecorder(null);