Back to QMetry All Products Help Page
Add Parameters
Introduction
The Parameters functionality allows testers to execute the same test case multiple times with different data inputs, without creating duplicate test cases. The functionality enables QA teams to store reusable test data in one centralized location. It also helps you to keep your test data consistent and manageable.
Example:
Below are the parameters with values:
Color Code
Display
Bluetooth Versions and
Tracker Version
The combination of parameter values creates a data set. Hence, first we will create Parameters with their values, and then we will create Data Set using both.
Color Code | Display | Bluetooth Versions | Tracker Version |
---|---|---|---|
1234 | OLED | Bluetooth v4.0 | Tracker Series 5 |
1237 | LED | Bluetooth v4.5 | Tracker Series 3 |
1236 | MOLED | Bluetooth v4.3 | Tracker Series 1 |
1234 | OLED | Bluetooth v4.1 | Tracker Series 2 |
Add Parameters and Values
You can create parameters and corresponding values directly from the test case page, eliminating the need to always navigate to the Parameters page in Configuration. The added parameters and values are auto-created in the Configuration module.
Required Permissions: Users must have “Create” and “Edit” for the Test Case module and “View” and “Modify” permissions for the Configuration module.
Notes:
Apart from the Configuration module, you can add Parameters and values from the Test Case module.
You can edit or delete Parameters and values only from the Configuration module.
Perform the following steps to add parameters and values:
1. Go to the test case detail page, and click the Steps tab.
2. Expand the Parameters section.
3. Click Add Column. A drop-down menu is added to the section with the list of existing Columns.
4. Type the column name that you want to add in the box. Either press ENTER on the keyboard or click on the Create <column name> option.
The parameter gets added.
5. To add values for the parameter, enter the value in the cell and press ENTER.
6. To add multiple values for the parameter, click the Add Row. A row will be added to create a new value. Follow the steps to add value as described above.
The Data Set of columns and rows added from the Test Case module looks as shown here.
The parameter and its value added in the Test Case module also get added to the Configuration module simultaneously.
Add Data Set
You can use these added parameters in test steps.
1. Go to the test case detail page.
2. Click the Steps tab.
You can see the Parameters expandable section along with Step Details. Add Columns and Rows to create a table of parameters. Columns will contain parameter names, and rows will contain corresponding parameter values.
3. To add a column, click on Add Column.
A drop-down list is enabled, which has the list of parameters you entered in the Configuration section (Configuration > Project Configuration > Parameters).
4. Select one parameter for the column. One parameter can be used only once for the column.
5. Now add values to the parameter. Click Add Row to add a row under the column. The drop-down list displays values in accordance with the parameter.
6. Select a value for the parameter column. You can use one parameter value multiple times.
This way, you can keep adding columns as per available parameters and their values.
A table of the Data Set is created.
Use of Parameters in Steps
To use the created parameters in the test steps of a test case:
Go to the Test Cases detail page.
Click the Steps tab. Parameters can be mentioned for Step Description, Input Data, and Expected Outcome.
To use a parameter, write it in this syntax @parameter. When you press@ on your keyboard, the available parameters will populate.
The Steps tab displays details like shown here.
Executing Parameterized Test Cases
Perform the following steps to execute parameterized test cases:
1. Once the test case with Parameters is ready, go to Test Cycle and link that test case with a test cycle.
2. Hover over the test cycle record, and the Execute icon becomes visible.
3. Click the Execute icon to navigate to the Test Execution screen to run the test and record the status.
On the Test Execution Screen, you can see the Parameter Groups under Step Details. Each Parameter Group has its test steps under it.
4. Execute the test steps under individual Parameter Groups on the screen.
Sync Steps
If steps are updated in the test case, then the link to sync steps appears on the execution screen.
Click the provided link to get the updated content of the steps.
Back to QMetry All Products Help Page