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

You must have completed the following tasks:
  • 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

When configuring input and output variables in a Run step, the following tooltips help indicate the status of each variable:
  • 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
These tooltips guide you in ensuring that all required values are correctly configured before running the test.

Procedure

  1. Click the Edit 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.
  2. Select an existing branch or create a new branch.
  3. 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.

  4. You can perform following tasks to configure variables:
    Task Action
    Define a value Perform following steps:
    1. Click Define variable icon .
    2. Type the value in the Value field.
    3. 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:
    1. Select the drop-down icon under the variable.
    2. Select Add new variable.

      The Add Variable dialog is displayed.

    3. Type the name of the variable in the Name field.
    4. Type the value in the Variable field.
    5. 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:
    1. Click the drop-down icon under the variable.
    2. 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:
    1. Click the drop-down icon under the variable.
    2. 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.

  5. Click the Close icon to close the run details pane.
  6. Click the Save icon to save the modifications.

Results

You have configured input and output variables in the Run step of a test or suite.

What to do next

You can run the suite in Test Editor sequentially or concurrently and view the Functional Report to verify the test steps with the variable assignment. See Running a suite sequentially or Running a suite concurrently.