Create & Use Test Data Profiles


Test data profiles can significantly enhance the efficiency of your testing process, especially when working with large sets of similar data. For example, to test the login functionality of a website, you may need thousands of data sets. This guide will show you how to create and use test data profiles in Testsigma.


Prerequisites

Before you begin, ensure you're familiar with concepts of Test Cases in Testsigma.


Create a Test Data Profile

  1. Navigate to Test Data > Test Data Profiles and click on Create Test Data Profile. create
  2. On the Test Data Profile details page, enter the Title for your test data profile in the Test Data Profile Info section. enter title for test data profile
  3. To create rows and columns, click the + icon next to the right navigation bar to add a new column, and click the + icon below the table to add a new row. add rows and column in tdp

    NOTE:

    If you must create test data expected to fail, enable the toggle button in the ETF (Expected to Fail) column.

  4. Click on Create to save your test data profile.

Here’s a quick GIF that demonstrates how to create a test data profile. create test data profile gif


Associate a Test Data Profile with a Test Case

  1. Navigate to Create Tests > Test Cases and click on Create Test Case. navigate to assoicate test data profile
  2. On the Test Case details page, click on Test Case Settings from the right navigation bar. test case settings
  3. In the Test Case Settings page, choose a Test Data Profile from the dropdown menu. assoicate test data profile
  4. Enable the Data-Driven toggle. Once enabled, you can filter and customise the data sets from your test data profile for use in your test case using the filters Iteration, Set Name, and Parameter.

    • Iteration: Filters sequential data sets using greater than, less than, or between operations.
    • Set Name: Filters non-sequential data sets by set names using operations like equals, contains, starts with, and ends with.
    • Parameter: Filters non-sequential data sets using parameters used in data sets. select data driven filters

Using Test Data Profile in a Test Case

  1. In Test Case detials page, click Add new step, and use NLP to create a new test step. use test data placeholder
  2. Include a placeholder for the test data. Click the test data placeholder, select @ Parameter from the test data types dropdown, and choose the parameter from right overlay. select parameter from overlay

Here is a quick GIF demonstrating the above workflow: use test data profile in test case


Data-Driven Testing with Dynamic Data Sets

In data-driven testing, you can iterate values from start to end. To iterate from the middle, set variables in a prerequisite test case and use them as start and end points by enabling data-driven testing.

Set Variables in a Prerequisite Test Case

  1. Navigate to Create Tests > Test Cases.
  2. Store the start and end data values in your test steps using the variables RunTime_TestData_Set_Start and RunTime_TestData_Set_End. create dynamic sets in data driven
ℹ️Example:

    For example, assign

  • RunTime_TestData_Set_Start = "delhi";
    RunTime_TestData_Set_End = "bangalore";

Creating Data-Driven Test Cases with Dynamic Data Sets

  1. In Test Case detials page, click on Test Case Settings and select the Prerequisite test case from the dropdown. select prerequiste for test case
  2. Enable the Data-Driven toggle and select Overwrite Test Data Set with a runtime variable for the Data iterates from/to dropdowns. select data driven test with dynamic set
  3. Create test steps and click Run to execute the test case.

Additional Actions on Test Data Set Name

  • Store: The test data set name associated with a test data profile can be stored in a variable for later use. The syntax for the Store NLP is store-iteration-count-test-data-set-name.
  • If Condition: The test data set values from a test data profile can be used in an if condition. The screenshot below shows the NLP, which can be added as part of the "String Compare" add-on. Find the add-ons to use here.

Steps to Generate Test Data Profile from Test Case Settings

  1. On the Test Case Details page, go to Test Case Settings > Test Data Profile.
  2. Click the Test Data Profile dropdown menu.
  3. Click Generate TDP with AI. This will open the Test Data Generation dialog.
  4. In the Test Data Generation dialog, validate the Field Names, then click Generate.
  5. Wait for the data to be generated. Once you are satisfied with the data, click Create and Replace.
  6. Your test data in the test steps will be replaced with the generated data.