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:
-
Go to Test Management > Test Library.
-
Click Add New.
-
Specify the information about a new test.
-
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.
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. |
-
Go to the Parameters tab. Click Add Parameter. A row for a new parameter will appear:
Click the image to enlarge it.
-
Give your parameter a name. In our case, it should look like this:
firstname
-
(Optional) Supply an arbitrary description in the Description column.
-
(Optional) Specify a default value for this parameter in the Default Value column.
-
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:
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:
-
Create a test set.
-
Go to the Parameters tab. Click Add Parameter. A row for a new parameter will appear.
-
Give your parameter a name.
-
(Optional) Supply an arbitrary description in the Description column.
-
(Optional) Specify a default value for this parameter in the Default Value column.
-
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:
-
If you want these parameters to use default values from the test itself, specify them as usual.
-
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:
-
Open the Edit Test form for the automated test you want to customize.
-
Switch to the Automation tab.
-
Open an automation.
-
In the field that will contain custom data, specify a parameter placeholder, for example:
Click the image to enlarge it.
-
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:
-
Open the Edit Test Set form for the test set that contains this automated test.
-
On the Parameters tab of the form, create a parameter that will pass the custom data, like shown below:
Click the image to enlarge it.
-
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