Test parameters

Parameters in a test enable you to run the test repeatedly with different data each time, which helps increase the flexibility of your tests.

Test parameters overview

A test parameter is a variable that can be assigned a value outside the test from which the parameter is defined.

When working with a manual test, you can use test parameters in the following way:

  1. Create parameters for your test.

    At this stage, you can define a default value for each parameter.

  2. Select the test parameters to be used in the design steps of your test.

    You can also call another test to add the parameters of the called test to a design step. This is useful if you have common steps you often want to perform as part of other tests.

    If you call to another test at this stage, you can assign an actual value to each parameter added to the design steps.

  3. Add the test to a test set for test running. You can assign an actual value to each parameter that has not be assigned actual values.

    • If you assign actual values when you create a test instance, the actual values are used in each run of the test instance.

    • If you assign actual values when you run a test instance, the actual values are used in that run only.

Back to top

Create test parameters

Create parameters for a test before using them in the test design steps.

To create a test parameter:

  1. From the test plan tree, select the target test.

  2. In the Parameters tab, click New Parameter.

  3. In the Test Parameter Details dialog box, provide the following information for the new parameter and then click Submit.

    Field Description
    Parameter Name Give the parameter a unique name.
    Default Value

    Give the parameter a default value.

    You can format the default value as you want.

    Description Provide additional information for the parameter.

To edit a test parameter:

You can edit a test parameter from the parameter grid or the parameter details window.

  • From the parameter grid: Select the parameter, double-click the column you want to edit, and make the changes.

    If you double-click a rich text field, such as Default Value and Description, a pop-up window opens that allows you to edit.

  • From the parameter details window: Select the parameter from the grid, click Parameter Details, and make the changes.

To see if a parameter is added in a design step

From the parameters grid, see the Used column. If the parameter is added in a design step, the Used column is checked.

Back to top

Add parameters to design steps

To use parameters in a design step, you can insert parameters to the design step or call to another test that includes the desired parameters.

To insert parameters to a design step:

  1. In the Design Steps tab of the target test, double-click the Description or Expected Result column of the design step where you want to use parameters.

  2. In the Description or Expected Result window, click Insert Parameter .

  3. In the Parameters window, insert existing or new parameters to the design step.

    • To insert a new test parameter, click New Parameter. See Create test parameters.

    • To select multiple parameters, use the Shift or Ctrl key.

    The selected parameters are displayed in the Description or Expected Result field, enclosed by <<< and >>>.

  4. Click OK.

Alternatively, to insert a new or existing parameter to the design step, you can enter the parameter name in the Description or Expected Result field by following the <<<parameter name>>> syntax. For example, <<<username>>>.

To call to another test that includes desired parameters:

See Call to test.

To remove a parameter from a design step:

Clear the parameter in the Description and Expected Result columns.

Back to top

Assign actual values to parameters

You are prompted to assign an actual value to a test parameter at different stages of the test where the test parameter is included.

Stage Details
At the design steps stage

When you call to another test that includes the test parameter, you are prompted to assign an actual value to the test parameter.

At the test instances stage

When you add the test to a test set as a test instance, you are prompted to assign an actual value to the test parameter if it is not assigned an actual value at the design steps stage.

The actual value is automatically applied to each run of the test instance.

At the test running stage

When you launch the test running, you are prompted to assign an actual value to the test parameter if it is not assigned an actual value at any previous stages (the design steps stage or test instances stage).

The actual value is applied to that test run only. When you start a new test run, you can assign a different actual value.

If you do not assign an actual value at this stage, the test is run with an empty parameter value.

To assign an actual value to a test parameter:

  1. In the Parameters of Test window that pops up, double-click the Actual Value cell of the parameter.

    At the test instances stage: You can also open the test instance details and assign actual values in the Execution Settings tab.

  2. Enter the actual value.

    You can also use the default value of the parameter, if any, as the actual value.

Back to top

See also: