title | metadesc | noindex | order | page_id | warning | contextual_links | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Create Test Data Profiles |
This article discusses steps in detail on how to create test data profiles that can be used in a test cases in Testsigma application. |
false |
5.21 |
Create Test Data Profiles |
false |
|
Test data profiles can significantly help the efficiency of your testing process, especially when dealing with large sets of similar data. For example, we need 1000s of data sets to test the login functionality of any website. Test data profiles are helpful in such cases. This article will discuss how to create a test data profile.
- You should know how to create a test case.
-
Navigate to Test Data > Test Data Profiles and click on Create Test Data Profile.
-
On the Test Data Profile page that opens, go to Test Data Profile Info and enter the name you want to assign to your test data profile.
-
Add rows and columns as per the requirements by clicking on Add New Row and Add New Column respectively.
[[info | NOTE:]] | If you want to create test data that is expected to fail, you can enable the toggle button in the column ETP (Expected to Fail). |ETF
Here’s a quick GIF that demonstrates how to create a test data profile.
-
Navigate to Create Tests > Test Cases and click on Create Test Case.
-
On Test Case details page, go to right side navigation bar and click on Test Case Settings.
-
From Test Case Settings page, choose Test Data Profile from the drodown.
-
Enable the Data Driven toggle. Once you have enable the data driven testing in your test case, you can narrow and customize the various data sets from your test data profile that are being used in your test case using the filters iteration, parameter, set name.
- Iteration: This type of filtering applies only to sequential data sets. The data sets can be filtered using the filter operations greater than, less than, or between.
- Set name: This filtering type applies to nonsequential data sets. Here, the data sets are filtered by data set names using the operations between, equals, contains, starts with, and ends with. Any data set names containing the set name or part of it are used in the test case.
- Parameter: This type of filtering is applicable for nonsequential data sets. Here, the data sets are filtered using parameters used in data sets.
-
The Test Data Profile is linked to Test Case.
-
Navigate to Create Tests > Test Cases and click on Create Test Case.
-
Delete test data placeholder from the above line and choose @ Parameters from the drop-down.
-
On @ Parameter overlay, select Test Data Profile and Parameter Name.
Here’s a quick GIF that demonstrates how to associate and use test data profile in a test case.
In data-driven testing, you can only iterate values from start to end. If you want to iterate from data sets from the middle, you have to set the variables in a prerequisite test case and use the variables as start and end by enabling data-driven testing to the test case.
- Create a Test Case by navigating to Create Tests > Test Cases.
- Store start and end data values in RunTime_TestData_Set_Start and RunTime_TestData_Set_End, respectively in your test steps.
For example, in the above test case, we store delhi in RunTime_TestData_Set_Start and chennai in RunTime_TestData_Set_End.
- Create a Test Case by navigating to Create Tests > Test Cases.
- Click on Test Case Settings and select the above test case as a prerequisite from the dropdown.
- Select the Test Data Profile, enable the Data Driven toggle, and select Overwrite Test Data Set with runtime variable for Data iterates from/to dropdowns.
- Create test steps and click on run to execute the test case.
Alternatively, you can also set values using Data iterates from/to dropdowns.
- Store: When a test data profile is associated with a test case. The test data set name associated with the test data profile can be stored into a variable for later use as well. Below is how the syntax for the Store NLP looks like:
- if: The test data set values, from a test data profile being iterated, can be compared within an if condition too. Below screenshot shows the NLP (The NLP can be added as a part of add-on “String Compare”. You can find the add-ons to use here: https://testsigma.com/addons):