Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel1

Introduction

The Test Data Parameterization functionality allows testers to execute same test case multiple times with different data inputs

Table of Contents
maxLevel1

Introduction


The Test Data Parameterization functionality allows testers to execute the same test case multiple times with different data inputs; without having to create duplicate test cases. It replaces the traditional practice of entering hard-coded input values with parameters. Test Data parametrization allows QA teams to store reusable test data in one centralized location, Import existing parameters, and data sets, and share data across QMetry projects. Parameterization of test data is one of the ways to make your tests consistent and manageable. You can create automated data-driven tests quickly using Test Data Parameterization in QMetry.



Example

The following values need to be validated against Employee IDs in an organization.

...

Here, Employee ID, Department, and User Type are parameters with values. The combination of parameter values creates a data grid.

Hence, first of all, fist we will create Parameters with their values and then Data Grid.

Step 1: Add Parameters


Steps to Add Parameters

Go to Test Cases > Data Parameter.

...

Enter the following details to create a parameter:

  • Parameter Name: Enter the Name of the Parameter. It should be unique across projects. Characters, numbernumbers, and some special characters -_&.' are allowed.
  • Project: The drop-down displays projects in which you have "Modify" rights of the Test Data Parameterization module. Select the project(s) to associate the parameter with. If you want to associate the parameter with the current project, then select the current project on the list. You can select multiple projects to link the parameter with. Maximum A maximum of 10 Projects can be associated at a time.
  • Description:
  • Values: Enter values for the parameter. For example, for the "User Type" parameter, the values can be "Read Only", "Regular", "Super Admin" and "Admin".

...

The Parameter details page opens in editable mode.

Note: Associated  An associated project can not be removed if the parameter is used in the test case of that project.

...

Select the parameters you want to unarchive and click on the Unarchive button.



Delete Parameters

First, archive the parameter to delete it.


Note: Parameters used in the test case (any version of it) can not be deleted.

...

These archived Parameters can be deleted individually. Click the Con icon for the parameter you want to delete and select Delete.



Step 2: Add Data Grid

Data Grid is a kind of a table that will have rows and columns within it.


Steps to Create a Data Grid

Once you are done adding parameters with values, you can create different combinations of these values i.e. Data Grid to run the test.

...

  • DataGrid Name: Enter Data Grid Name that is unique across projects.
  • Project: The drop-down displays only those projects in which you have the "Modify" rights of Test Data Parameterization module. Select project to associate the DataGrid with. If you want to associate the DataGrid with the current project, then select the current project on the list. You can select multiple projects to link the Data Grid with.
  • Description
  • Values: This will create a structure of rows and columns. First, add the columns that you required, then keep adding rows for the values. The values for rows are prompted for the parameter selected as a column. For example, for the "User Type" parameter, the values can be "Read Only", "Regular", "Super Admin" and "Admin". You just need to select values for the parameters and create different combinations. At lease least one parameter name and value combination is are required.


Note: Maximum 20  A maximum of 100 rows and 100 20 columns can be added in to a Data Grid.



This way you can create multiple Data Grid for multiple data sets that will be executed.


Note: If you have already entered Data Grid manually, then the use of the Autofill Values option will reset those values.

...

These filters can be applied to the records: Projects (for which users has "View" rights of Test Data Parameterization), Name, Created Date, Updated Date, and Archived.



Create Data Grid directly from Parameters

...

The screen opens with Parameters on it.

Select the Parameters you want to add in to Data Grid by selecting the corresponding check boxes.

Click Next.



Step 2: Create a Data Grid

The next screen opens for Data Grid creation.

...

  1. Go to Test Cases > Data Grid.
  2. Enter DataGrid Name.
  3. Select the Project(s) to apply the Data Grid. You can select multiple project projects to associate the data grid with.
  4. Set Columns as required.
  5. Click on the Autofill Values button.

...

  • Unique Values: It will create Data Grid with a unique combination of values in sequential order.
  • Randomize Data: It will create Data Grid with repeated values in it irrespective of a number of time times the values are used.
  • Rows: The field becomes visible for Randomize Data. Mention the number of rows you want to generate using the random data. Maximum 100 rows can be created at a time.

...

The Data Grid details page opens in editable mode.

Note: Associated  The associated project can not be removed if the Data Grid is used in the test case of that project.

...

If you do not need a Data Grid any moreanymore, then you can archive it to stop it from showing on the list.

Note: Data Grid that is mapped with a test case can not be archived.

...

The next screen displays records of the Data Grid with check boxescheckboxes.

To archive multiple Data Grid records at a time, select records using check boxes and the click on the Archive button.

...

The next screen displays records of archived Data Grid with check boxescheckboxes.

To unarchive multiple Data Grid records at a time, select records using check boxes and the click on the Unarchive button.



Delete Data Grid

First, archive the Data Grid to delete it.

...

Data Grids can be deleted individually. Click the Con icon for the Data Grid you want to delete and select Delete.


Step 3: Use Parameters in Test Cases

Till now you have created test data sets through Parameters and Data Grid. Now we will see how we can use the parameters in test steps of a test case.

Go to the Test Cases Module.

Open the test case detail page and go to Test Steps section
Insert Parameter using @ sign on the keyboard.

The list of parameters populate populates on entering @ sign.

Parameters can be mentioned for Step Description, Input Data, and Expected Outcome.

To use the parameter, just press @ on your keyboard and the available parameters will populate.

The test step field looks like this:

            

Step 4: Link Test Cases to Test Suite


Now link the parameterized test cases to the test suite. Manual test cases can also be linked to the test suite along with parameterized test cases. The test case with the test data parameter gets a tag of Parameterized. 
Image Removedto the test suite. Manual test cases can also be linked to the test suite along with parameterized test cases. The test case with the test data parameter gets a tag of Parameterized. 


A color code indicator is provided to quickly identify whether the parameter values have been assigned to the test case parameters or not on the execution screen. It helps the test execution planner quickly identify such test cases that do not have values assigned to their parameters.

Use Case: A test execution planner, who is responsible to create and plan the test executions and assign them to the testers for actual executions, needs an indicator to identify parameterized test cases that contain a parameter that does not have any data values assigned for executions.


Color of @ sign

Indication

@ in Grey

It indicates non-parametrized test cases.

@ in Blue

It indicates parameterized test cases that do not have data values (for either all or any of the parameters) assigned for executions.

@ in Green

It indicates parameterized test cases having values assigned for all parameters.


→ When either all or any one of the parameters do not have values, the @ sign appears in Blue.

Image Added


→ Once values are assigned/mapped to all the parameters, the @ sign appears in Green. 


Image Added


Mapping Data Grid


On the test suite detail page, go to the Test Cases section. If you have linked Parameterized test cases with the test suite, then the information is displayed on the screen like below.




Click on the @ sign to add values to the parameters. You can see that the @ sign for parameterization is highlighted and has a hyperlink on it.

The Mapping DataGrid screen opens.



You can select either of the following as Data Source:

Select DataGrid: If you want to Select the option to select the Data Grid created under the Data Parameterization module.

  • Data Grid: The drop-down displays all the Data Grids created under the Data Parameterization module. The data is populated in the below table as per the grid selection.

Fill Data Manually: As an alternate, you can enter the parameter values manually, then select this option. Map values with corresponding parameters.



Click Save to save the mapping of the Data Grid.

Step 5: Execute Parameterized Test Cases

Open the test suite detail page and open the Test Execution tab on it. Click on the play icon to navigate to the Test Execution Screen to run the test and record the status.


Image RemovedImage Added


On the Test Execution Screen, when you click on the Expand All button, the test cases with parameterization get expanded up to Parameter Groups.
The steps count at the test case level displays (the count of test steps X count of data sets).


Expand each Parameter Combination to view the test steps under it.


Image RemovedImage Added


Execute the test steps and test cases on the screen.

...

If a new column is added to the Data Grid from Test Cases > Data Grid.Then , then to reflect the changes in the existing mapped Data Grid -

1. Open the test suite detail page and go to the Test Cases section.

2. Click on the @ sign to open the Data Grid Mapping screen.

3. Click on the Sync Columns button.

...