Menu

Test Cases and Test Runs with Parameters

You can add parameters when designing test cases in qTest Manager's Test Design module.  A parameter is a variable which can be assigned an actual value when creating or executing test runs.  It will allow you to execute the test case repeatedly with different data each time.

To execute test runs with parameters:

  1. Define your parameters in your qTest Manager Parameters.
  2. Design your test cases and add parameters in Test Steps.
  3. Create test runs from parameterized test cases.  At this stage, you will need to assign parameter values which will be used during test execution.
  4. When executing test runs in the TestPad or viewing existing test logs, you will see the actual executed parameter values in the test steps, not the parameters themselves. 

Insert Parameters in Test Cases

  • To add a parameter to your Test Cases, the parameter needs to be assigned to your project in qTest Parameters.
  • Currently, you can only add parameters to Test Steps Description.

To add parameters to your Test Cases:

  1. Select an existing Test Case or create a new one.
  2. In the Step Description field, type '@' followed by the parameter identifier to search for your parameters. 



  3. You can use the Up and Down key to navigate through the dropdown list and Enter to select a parameter.  Alternatively, you can click to select a parameter.
  4. If you type @ and text but do not select any parameter from the drop-down, it will just be some normal text, not an inserted parameter. 



  5. In Step Description edit mode, the parameter is displayed as [~identifier].
  6. In Step Description view mode, the parameter is displayed as @identifier and is hyperlinked to the parameter's profile page in qTest Parameters. 

Create Test Runs with Parameters
Test Runs can be created from the Test Design tab or the Test Execution tab.

Create Test Runs from Test Design

  1. Select an existing Test Case from the Test Design tree.
  2. Click the Add Test Run button.
  3. Select a location in Test Execution tree where the Test Runs will be located.

Create Test Runs from Test Execution:

  1. Select a location on the Test Execution tree.
  2. Click the Add Test Runs button on the tree's toolbar.
  3. Select Requirements, Test Cases, Test Runs or Defects to create Test Runs.

If some of the selected Test Cases include parameters, qTest Manager will prompt you to assign parameter values.  You can create multiple Test Runs with different parameter values from a Test Case at one time.

  1. Select a Test Case in the drop-down list to assign parameter values.
  2. Review the Test Run Location where the Test Runs will be located.  You can click the Modify button to change the location.
  3. Since you can create multiple Test Runs from a Test Case at one time, you need to select how to name the Test Runs.
    • System default: Test Run names are the same as the Test Case name with an appended incremented numeric value.
    • Customize Test Run Name: You can define custom Test Run names.  Use @ to specify parameters which are included in the Test Case; their assigned values will be filled in the Test Run names.
  4. Select one of the methods to create Run Data.  There are various ways to assign parameter values when creating Test Runs.  (See the details in the sections shown below.)
    • Manually: Manually select values for parameters one-by-one.
    • Randomize data: The system will randomly select values for your parameters.
    • From Dataset: Use pre-defined data from your Dataset to create Test Runs.
  5. Select the number of Test Runs you would like to create.
  6. Assign or preview the parameter values, if needed.
  7. You can select the following options before creating Test Runs.
    • Do not add duplicate Test Runs in the same location: If a Test Run has the same Test Case version and same set of parameter values in the selected location, the duplicate is not created.
    • Do not add duplicate Test Runs: If a Test Run has the same Test Case version and same set of parameter values, the duplicate will not be created.
  8. Click + Add button to create Test Runs.  If there are multiple Test Cases in the Test Cases drop-down list, after you have created Test Runs from a Test Case, the system will automatically navigate to the next one.

assign-param-values

NOTE: Test Run Configurations will not be applied to Test Runs created from Test Cases with parameters.

Manually Insert Parameter Values

IMPORTANT: Parameters must be active and assigned to your qTest Manager project so you can fill their values to the Test Runs.

  1. Select Manual from the Create Run Data drop-down list.
  2. Select up to 10 and click Add Test Run(s) to add rows to the run data grid.  You should only create up to 100 Test Runs at a time.
  3. On the run data grid, manually assign values to every parameter.
    • Type some text in the drop-down list to search for your parameter value.
    • If you do not type any text in the drop-down, the first 10 alphabetically sorted values are displayed.
    • If no parameter value is retrieved, check your parameter in TDM whether it has no values, is not assigned to your qTest Manager project, or is inactive.

    create-test-run-assing-param-values-manually

  4. Click the Remove icon on each row to remove it. 

    create-test-run-assing-param-values-manually-remove-row

  5. Click the Add button to create Test Runs with the selected parameter values.  If you assign the same set of parameter values to more than one row in the grid, the system will confirm with you if you want to create duplicate Test Runs. 

    create-test-run-assing-param-values-manually-duplicate-rows

Randomize Parameter Values

  1. Select Randomize Data from the Create Run Data drop-down list.
  2. The system randomly selects values for all parameters included in the Test Case.  You can choose one of these options:
    • Unique Data Combinations Only: Each row in the data preview grid will contain a unique combination.  Parameter values can be repeated, but no two rows will have the same combination of data.  This option is disabled in case there is only one parameter included in your Test Case.
    • Unique Values Only: Parameters will not be repeated and no two rows will have the same parameter value.
  3. You can see the number of available data combinations next to each option above.  If 0 is displayed, please check your parameters in qTest Parameters if one of them has no values, is inactive, or is not assigned to your project.
  4. Select up to 100 data combinations.  You can create up to 100 Test Runs at a time.
  5. At this stage, you can click the + Add button to quickly create Test Runs with the randomized data or you can click the Preview Data button to preview the randomized data and modify them if needed before creating Test Runs.
    • Type some text in the parameter value drop-down list to search for the values.
    • If you do not type any text in the drop-down, the first 10 alphabetically sorted values are displayed.
    • Click the Remove icon on each row if you want to remove it.
    create-test-run-assign-param-values-randomize

Use Dataset for Parameter Values

IMPORTANT: In qTest Manager, parameters must be active and assigned to your qTest Manager project so that you can fill their values to the Test Runs.

You can only use Datasets which are active and include all paramters in the Test Case.

  1. Select a Dataset
    • Type some text in the drop-down list to search for your Dataset.
    • If you do not type in any text in the drop-down, the first 10 alphabetically sorted data sets are displayed.

    create-test-run-assign-param-values-from-dataset-select-dataset

  2. After you have selected a Dataset, you can see its number of rows next to the drop-down. 

    create-test-run-assign-param-values-from-dataset-select-dataset-available-combinations

  3. Select the rows from the Dataset you want to use to create Test Runs by selecting:
    • From Row Number: Select a row's order number in the Dataset.
    • Number of Rows: Select up to 100 rows counting from the row's order number above.
  4. Map the parameters included in your Test Case with the corresponding ones from the Dataset.  qTest Manager will try to do the mappings for you in advance, but you can change it. 

    create-test-run-assign-param-values-from-dataset-select-dataset-map

  5. You can click the + Add button to quickly create Test Runs with the randomized data or you can click the Preview Data button to preview data from the selected Dataset.  You can remove any data rows from the grid if you do not want to create Test Runs with them. 

    create-test-run-assign-param-values-from-dataset-select-dataset-preview-data

Executing Test Runs with Parameters

Execute Parameters with TestPad:

  1. When you have selected values for all parameters, save and reload the Test Run page so you can see the Run and Quick Run buttons.  

Parameterization Settings

You will not be able to create or execute Test Runs if the associated parameters are not assigned to your qTest Manager project in qTest Parameters.

In the cases shown below, your parameters must be automatically assigned to qTest Manager projects so your Test Runs are executable:

  • Copy Test Cases or Test Steps from project P1 to project P2: If the parameters in the source Test Case are not assigned to P2, you may not be able to create Test Runs from the destination Test Case in P2.
  • Create Test Runs in project P2 from a shared Test Case in project P1: If the parameters in the Test Cases are not assigned to P2, the Test Runs may be unexecutable in P2.

qTest Manager provides these options under your project settings; they are enabled by default.  If you disable these options, you will need to manually correct your parameters in qTest Parameters.

To access to Parameterization Settings:

  1. Click the Gear icon on the top left corner.
  2. Select the Test Settings option.
  3. Under Parameterization Settings, you can change the feature's activation status and select these two options to Allow parameters from this project to be used in any destination project:
    • For test cases copied from this project
    • For test cases shared from this project
  4. The activation status is ON and the two options are selected by default.  If you plan to not use parameters in your project, it is recommended to switch it off
Subscribe To Our Blog
Powered by Zendesk