Extending Non-virtualized Test with Custom Data Definitions

Topaz for Total Test Non-virtualized Test can be extended by creating Data Extensions. A Data Extension can extend either test scenarios or the execution context (which also involves Environments). Data extensions are defined by Total Test administrators through the web client and they are used for all test scenario, environments and contexts.

A Data Extension can be a single String value, a list of values, a boolean or a choice, and a default value and a required field can be set.

Extending a Test Scenario

Extending a test Scenario means that developers can add additional info to a test scenario in the test Scenario editor.

Let us illustrate by creating an extension that requires developers to enter a department name to the test scenario.

  1. In the web client, login as administrator and navigate to Configuration > Data Extensions. Click the + sign and fill in data as illustrated below.

inset_0.jpg
  1. Click Create

  2. Open the Eclipse client, create a new test scenario, make a change and save it and see that it now writes an error message that required data Department has not been set.

  3. Select the Structures tab and fill out the department name in the Department text field.

inset_1.jpg

 

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 Total 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.

As before let us illustrate this with an example.

  1. At the Data Extensions page, add a new Data Extensions, select the Extension Type to be Execution context, and fill in some values as illustrated below. Click Create.

inset_2.jpg
  1. Select an environment, click Edit and set the testvar variable that now appears as an input field. In this example, set the value to FromEnvironment12. Click Update.

inset_3.jpg
  1. Data extensions are only synchronized to Eclipse at startup, so restart Eclipse and execute any test scenario. In the Execution dialog see that now the testvar data extensions appear in the dialog and the default value from the environment is shown.

inset_4.jpg
  1. Execute the test scenario and look into the log where you now see that the testvar value is available as a variable.

inset_5.jpg