Variables are named values, used to provide input to tasks. Variables are defined per repository and are therefore available to all tasks in the repository and related test plans. By linking task parameters to variables, it is possible to have a centralized control over parameter values.

πŸ“˜

All variables are defined in the repository. Test Plans cannot have private variable definitions.

865

Variable Types

There are several supported variable types useful in various situations.

Value

The value of the variable can be set manually on a test plan branch (group or test case). The variable value overrides the default value and will be the effective value for all tasks in the branch.

This is useful when you have multiple similar test cases differing in only a few items of input data. Linking input parameters to value variables allows you quickly duplicate the test case and modifying variable values to test additional portfolios, instruments, time periods etc.

Expression

An expression variable is used to define an expression that is evaluated to provide a value runtime. The expressions can contain calculations and references to other variables, e.g.:

  • Add on month to the β€œStart Date” variable: AddMonths($Start Date$, 1)
  • Combine variable values: $Test Phase$+”-β€œ+$ExecutionId$
  • Use todays date as a the value: Now()

This is useful to minimize the number of variables requiring manual input, and provides additional flexibility in building the test plan.

Execution Id

For each execution that is started an execution id is created. This variable provides access to the current execution id to be referenced by task parameters.

Global

A global variable provides a global constant default value. Unlike Value variables, it cannot be overridden in branches of the test plan.

Using global variables where applicable adds transparency, as you know exactly what value will be provided and that the default value cannot be overridden in any part of the test plan.

Login

A login variable references a login defined in the logins view, allowing tasks to reference a variable referencing a login instead of a login directly. This is particularly useful when configuring test case templates, where the login used by each task can be controlled per reference via the linked login variables.

Group values

By selecting a group or test case it is possible change the β€œEffective Value”. Changing this value will change the value for all tasks in that group. If the β€œEffective Value” is black it is set on the selected group, while gray text means it’s inherited from its parent group.

832

It is also possible to see and change the variable value by expanding the row. In this case the Portfolio variable is set on the Loans group and then inherited.

860

Selecting another task shows that a different value is used for that branch in the tree.

859

Variables in test plan

By checking the β€œTest Plan” checkbox, the variables effective value will be shown as a column in the test plan view. Value variables can also be changed from the test plan column. Unsaved values are bold in the test plan and can be saved using (Ctrl-S) or by saving the variable in the variables view.

800

Variables by group

You can also set variable values for a group or test case directly from the group/test case configuration view.

777

Only variables that are used by any task in the selected branch are shown to provide a more concentrated view. If you are working with a large test plan that uses many variables you may prefer this way of setting variable values.