Back to QMetry All Products Help Page
Add Parameters
Introduction
Parameters functionality allows testers to execute the same test case multiple times with different data inputs; without having to create duplicate test cases. The functionality allows 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
Testers have the capability to create parameters and corresponding values directly from the test case page, eliminating the need to always navigate to the Configuration > Parameters page. The added parameters and values shall be auto-created in the Configuration module.
→ Required Permissions: Users should have “Create” and “Edit” for the Test Case module and “View” and “Modify” permissions for the Configuration module.
Notes:
Apart from the Configuration module, Parameters and values can also be added from the Test Case module.
Parameters and values can be edited or deleted only from the Configuration module.
Steps:
1. Open the test case detail page and go to the Steps tab.
2. Expand the Parameters section.
3. Click on the Add Column option. 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 on the Add Row button. 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 look like below.
The parameter and its value added in the Test Case module also get added to the Configuration module simultaneously.
Add Data Set
These added parameters are used in test steps as shown below.
Open the test case detail page.
Open the Steps tab. You can see the Parameters expandable section along with Step Details. To create a table of parameters, you need to add Columns and Rows. Columns will contain parameter names and rows will contain corresponding parameter values.
To add a column, click on Add Column.
A drop-down is enabled which has the list of parameters you entered in the Configuration section (Configuration > Project Configuration > Parameters).
Select one parameter for the column. One parameter can be used only once for the column.
Now add values to the parameter. Click Add Row to add a row under the column. The drop-downs display values in accordance with the parameter.
Select a value for the parameter column. One parameter value can be used multiple times.
This way you can keep adding columns as per available parameters and their values.
A table of Data Set is created as shown below.
Use of Parameters in Steps
Till now you have created test data sets through Parameters. Now we will see how we can use the parameters in the test steps of a test case.
Go to the Test Cases tab.
Open the test case detail page and open 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 Step Details will look like below.
Executing Parameterized Test Cases
Below are the steps to execute parameterized Test Cases:
Once the test case with Parameters is ready, go to Test Cycle and link that test case with a test cycle.
Hover over the test cycle record, the Execute icon becomes visible.
Click on 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.
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 will be visible on the execution screen. Click on the provided link to get the updated content of the steps.
Back to QMetry All Products Help Page