RCPTT Documentation Center
  • User Guide
  • FAQ
  • Back to RCPTT Main Site
  • Eclipse.org
  • Get Started
  • Test Case Editor
  • Control Panel
  • Assertions
  • Eclipse Command Language
    • New ECL Command Guide
    • ECL commands for Excel import and export
    • ECL commands for XML import and export
  • Contexts
    • Workspace
    • Workbench
    • Launch
    • Preferences
    • Parameters
    • Group
    • Folder
    • Default
    • Super
    • ECL Script
  • Verifications
    • Text
    • Table/Tree
    • Error Log
    • Time
  • Procedures and Variables
  • Test Runner
    • Arguments
  • Maven plugin
  • RAP
    • Install instructions
    • Record and Replay
    • Capability Contexts
    • ECL commands
    • Maven plugin
  • Integration
    • TestRail
    • Zephyr

Launch Contexts

Launch contexts are used to control AUT Launches and Launch Configurations.

Move a mouse over highlighted areas on a screenshot below to get a documentation regarding UI elements

All you need to know about context name
All you need to know about tags
All you need to know about adding tags
Make a snapshot of AUT running launches and launch configurations and copy them into this context.
Adds launch configuration to AUT. Launches given configuration in a defined mode. Suspend launch at a given breakpoint. If Clear workspace option is on, removes existing projects from AUT at first.
Turned on by default. Terminates all running launches if any.
If Terminate existing launches is on - this option allows to specify a list of launches, which should be kept intact.
Turned off by default. Clears a list of AUT launch configurations.
If Clear launch configurations is on - this option allows to specify a list of launch configurations, which should be kept intact.
Turned on by default. Clears all breakpoints.
"Add" button is always disabled for now.
Remove launch configuration/launch with this button.

Introduction

Sometimes for our testing we need to specificly configure AUT launches. Launch Context can manage it.

Launch Context serves the following porposes:

  • Add Launch Configurations and/or run the required ones
  • Add breakpoints and pause a required launch at a breakpoint
  • Terminate existing launches (optional)
  • Clear launch configurations (optional)
  • Clear breakpoints (optional)

Thus you may flexibly adjust your AUT Launch Configuration state to make everything ready for test creation.

Terminate Existing Launches.

Once you create a new Launch Context you can see that Terminate existing launches option is enabled by default. That means the following: when the context is executed all running launches in your AUT will be terminated.

You can exclude any desired launches to avoid their termination - just list them in a Do not terminate launches... field:

When the context is executed all launches are terminated except "myClass".

If you uncheck Terminate existing launches button option - no running launches will be terminated during context execution.

Clear Launch Configurations.

This option should be used if you wish to clear a list of existing Launch Configurations (disabled by default).

By analogy with the termination described above you may want to leave some Run Configurations. Just list them in "Do not delete following configrations" field.

Capture running launches state into a Launch Context.

Let's say you have 2 Launch Configurations - HelloWorld and ByeWorld - and to do your test you need both of them running and suspending at breakpoints.

Once you have this state in your AUT you can press Capture button and all your AUT launches state will be captured as a context which will have all information about:

  • Existing launch configurations
  • Exising running launches (and their running modes - "run" or "debug")
  • Existing breakpoins

Now you can use this context in your test case - it will add corresponding configurations, run the required launches in a debug mode and suspend them at their breakpoints.

Once you captured launch configurations - you can always edit it manually by removing any of the configuration with Remove button (Add button is always disabled for now).

You may also manually change the attribute values:

You can change the mode, set 'run' or 'debug'.

Test Example: verify variable value during a debug process.

Let's imagine that you need to create a test case which verifies that variables are correctly updated during a debug process.

To get this you need to create your Java class file, set a breakpoint, run this class in a debug mode, switch to debug perspective with variables view and (finally!) make a verification.

But in fact all actions before a verification - is AUT state and not the test itself. Using RCPTT Contexts you may make your test elegant and easy-maintaining.

So you need the following contexts:

  1. Workspace context - to put Java Project on AUT workspace:

    Move a mouse over highlighted areas on a screenshot below to get a documentation regarding UI elements

  2. Workbench context - to switch to Debug Perspective:
  3. Launch context - to set a breakpoint and run java class in a debug mode:
  4. Place these contexts into your test case and record your test which shrinks to a few lines of code:

You may note Stop all launches context marked as a Default context. It terminates all active launches before a workspace context will try to delete all files. This hint helps us to avoid the situation when some files could be locked. It's a good practice to use this context as a Default Context for AUT with launches.