1. Automated GUI Testing

1.1. Getting started

This section describes the required steps to run existing or create new automated GUI tests for RCE using the RCP Testing Tools (RCPTT):

  • In the view "Applications" add RCE as Application under test (AUT) via "New... ". Use RCE's main folder as location.

  • Configure AUT (Rightclick on entry in "Applications" view -> Configure... -> Advanced...):

  1. Set a profile different from the default one to make sure your productive RCEs won't interfere with RCPTT's RCE and vice versa. Therefore go to "Arguments" tab and add to Program arguments e.g "-p my_rcptt_profile".
  2. Set dev_config: Download from dev_config.ini from https://svn.sistec.dlr.de/svn/rce/new/rce/trunk/de.rcenvironment/eclipse/launch/installation_data/

    In "Configuration" tab select "Use an existing config.ini file as a template" and navigate to the file you just downloaded.

  3. Set launcher: In "Arguments" tab add the following VM argument: "-Dde.rcenvironment.launcher=de.rcenvironment.launcher"
  4. Set allocate console for StdIn and StdOut: To access StdIn and StdOut directly from console view in RCPTT go to "Common" tab and check "Allocate console (necessary for input)
  • Check if RCE can be started from RCPTT by double clicking on the entry in the "Applications" view

  • Now you can either run existing test cases (A) or create your own test cases (B):

A: Run existing test cases:

  • Create an RCP Testing Tool Project in the Test Explorer on the lefthand side

  • Checkout the following folder and add it to the project: https://svn.sistec.dlr.de/svn/rce/new/rce/trunk/de.rcenvironment/eclipse/ui-testing/RCPTT

  • In the folder "Testsuites" navigate to "AllPlatforms" and execute the testsuite (Rightclick -> Run As -> Test Cases)

  • Find the Execution View on the bottom left which shows the progress of the testcases

  • Do the same for the testsuite that matches your platform.

B: Create your own test cases:

  • For the next steps also refer to RCPTT's getting started guide: https://www.eclipse.org/rcptt/documentation/userguide/getstarted/

  • Create an RCP Testing Tool Project in the Test Explorer on the lefthand side

  • Create a Test Case within this project

  • Capture script via "Record" button in the upper right corner and then clicking around in RCE
  • Capture verification by switching to Assertion Mode in the menu bar of the Control Panel and then selecting some element in RCE
  • Click save, stopp and then the Return to RCPTT/Home button

  • Create a Context within the project (New -> Context). Contexts are proconditions for tests, e.g. to make sure there is a clean setup. For instance, choose a context of type "Workspace" an leave the default settings so it will clear the workspace upon being applied.

  • Add the context to the test case by selecting the "Contexts" tab in the test case, click "+" and choose the one you just created.

  • Replay script by clicking "Replay" in the upper right corner.