Extending the Execution Context
A test scenario is normally environment independent which means that the test scenario can be reused across environments without any changes. This is the general case. In some cases you might need environment specific information in a test scenario, and the test scenario might need to behave differently depending on the environment in which its being executed. With Non-virtualized Test it is possible to define custom data extensions that extend the Execution Context and environments. This allows administrators to define the data values at all environments and developers to use or override these when executing test scenarios. The values will be available as variables in the test scenario when it executes. These variables can then be used to for example, setup the execution of a component or used in an If element to only execute part of the test scenario depending on the environment.
Data extensions are only synchronized to Eclipse at startup, so
- Restart Eclipse.
- Execute any test scenario.
In the Execution dialog box see that now the testvar data extensions appear in the dialog box and the default value from the environment is shown.
- Execute the test scenario and look into the log where you now see that the testvar value is available as a variable.