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
Sometimes for our testing we need to specificly configure AUT launches. Launch Context can
Launch Context serves the following porposes:
Thus you may flexibly adjust your AUT Launch Configuration state to make everything ready
for test creation.
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:
If you uncheck Terminate existing launches button option - no running launches will be
terminated during context execution.
This option should be used if you wish to clear a list of existing Launch Configurations (disabled
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.
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:
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:
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:
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.