Applies to QAComplete 12.31 SaaS & On-Premises, last modified on September 12, 2019

Use parameters to have the ability to input different values in a manual test for each run, or to run manual test sets using the same set of input values for each separate test.

Note: To repeat a manual test multiple times using different sets of input values, use tokens.

Create parameters

To create a test with a set of parameters:

  1. Go to Test Management > Test Library.

  2. Click Add New.

  3. Specify the information about a new test.

  4. On the Steps tab, add the needed steps, then enclose the name of your token in percent signs within the description of the step and in the Expected Result field.

    Parameters: Steps tab

    Click the image to enlarge it.

    For example, if you want to create a parameter that represents the first name of a user, it might look like this:

    %firstname%

    In parameter names, use only valid alphanumeric characters and underscore – that is, no symbols, spaces, extended or special characters.
  5. Go to the Parameters tab. Click Add Parameter. A row for a new parameter will appear:

    Parameters tab

    Click the image to enlarge it.

  6. Give your parameter a name. In our case, it should look like this:

    firstname

  7. (Optional) Supply an arbitrary description in the Description column.

  8. (Optional) Specify a default value for this parameter in the Default Value column.

  9. Click Save and Close to apply the changes.

After this, when you launch the Test Runner for this test, a dialog window will appear, offering you to provide values for all parameters included in this test:

Input parameter values dialog

The parameter placeholder (that is, %firstname% in our case) will be replaced with the value you specify.

Shared parameters

To use the same set of parameters within the test set:

  1. Create a test set.

  2. Go to the Parameters tab. Click Add Parameter. A row for a new parameter will appear.

  3. Give your parameter a name.

  4. (Optional) Supply an arbitrary description in the Description column.

  5. (Optional) Specify a default value for this parameter in the Default Value column.

  6. Go to the Tests tab and append the needed tests to the new test set. For each test, a dialog will appear, offering you to specify the values of this test’s parameters within the test set.

    • If you want these parameters to retrieve values from the test set parameters, specify them as parameter placeholders. For example, if you have the email-address parameter in the test, and you want its value to be equal to the value of the test set’s email parameter, enter the following:

      %email%
    • If you want these parameters to use default values from the test itself, specify them as usual.

  7. Click Save and Close to apply the changes.

After this, when you launch the Test Runner for this test set, a dialog window will appear, offering you to provide values for all parameters included in this test set. The parameter placeholder will be replaced with the value you specify.

Parameterize automated tests

To use parameters to pass custom content to automated tests, do the following:

  1. Open the Edit Test form for the automated test you want to customize.

  2. Switch to the Automation tab.

  3. Open an automation.

  4. In the field that will contain custom data, specify a parameter placeholder, for example:

    %MyArgument%
    Edit Test: Automation

    Click the image to enlarge it.

  5. Save the changes.

This allows you to modify any fields of the automated test record, without creating duplicate records of the same test with various parameters.

In addition, you can pass custom data to automated tests within test sets. To do that:

  1. Open the Edit Test Set form for the test set that contains this automated test.

  2. On the Parameters tab of the form, create a parameter that will pass the custom data, like shown below:

    Edit Test Set: Parameters

    Click the image to enlarge it.

  3. Save the changes.

After this, upon starting the customized test set, a dialog window offering you to provide the needed values will appear. The parameter placeholder within the test’s field value will be replaced either with the default value of the parameter, or with the value you will specify.

See Also

Token Tests
Manual Tests
Test Library

Highlight search results