Configuring test variables in the Run step of a test or suite
You can configure input and output variables in a Run step to pass values into and out of a test during test run.
Before you begin
- Ensured that you are assigned a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
- Read and understood the information in Edit branch overview and Create or select an Edit branch.
- Ensured that your project contains a Web UI test or suite.
- Ensured that your project contains a dataset.
About this task
- Using default variable: The variable uses a predefined default value from the called test.
- Value expected: No value or mapping has been provided, and the variable does not have a default value. A value must be provided at runtime.
- Value provided: A value has been successfully assigned, either through direct input, variable mapping, or hard coding.
- Using variable: The variable is mapped to an existing variable in the parent test.
- Value ignored: The variable is configured as an output, but its returned value is not used or mapped in the calling test.
- Value extracted: The variable is configured as an output, and its value will be captured from the called test
Procedure
-
Click the
button displayed on the Test
Editor page.
The Edit button appears only when no active edit branch is selected.
Alternatively, right-click the test in the test navigator panel and select Edit.
The Edit branch dialog is displayed.If the Edit branch is not displayed, then go to step 3. - Select an existing branch or create a new branch.
-
Click the Run step in the Test
Editor.
The run details pane opens with the Details tab selected by default. The variables in the test or suite are displayed in the Inputs and Outputs section.
-
You can perform following tasks to configure variables:
Task Action Define a value Perform following steps: - Click Define variable icon
. - Type the value in the Value field.
- Click Add.
The tooltip is updated as Value provided, and the define variable icon
is disabled.Add a new variable in the suite Perform the following steps: - Select the drop-down icon
under the variable. - Select Add new variable.
The Add Variable dialog is displayed.
- Type the name of the variable in the Name field.
- Type the value in the Variable field.
- Click Add.
A new variable is created and mapped to the selected variable.
Link the new variable to the parent variable Perform the following steps: - Click the drop-down icon
under the variable. - Select an existing variable from the parent test.
The tooltip is updated as Value provided, and the define variable icon
is disabled.Change the value of a variable Type the new value directly under the variable name. The tooltip is updated as Value provided, and the define variable icon
is disabled.Map output variables Perform the following steps: - Click the drop-down icon
under the variable. - Select an existing variable from the child test to capture the output value.
The tooltip is updated as Value extracted, and the define variable icon
is disabled.If no mapping is done, the tooltip is displayed as Value ignored.
- Click Define variable icon
-
Click the Close icon
to close the run details pane.
-
Click the Save icon
to save the
modifications.