Test Data Parameterization with specific row data to use and execution with codeless.

You are here:
< All Topics

Overview:

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 Parameterization enables QA teams to:

  • Store reusable test data in a centralized location.
  • Import existing parameters and data sets.
  • Share data across projects.

Parameterization of test data is an effective way to make your tests consistent and manageable. You can quickly create automated data-driven tests using Test Data Parameterization in TestGrid.

In TestGrid, if you want to keep your test data separate from the test case, follow this 3-step process:

  1. Create a CSV file with the test data.
  2. Convert the CSV file into a URL that returns JSON data.
  3. Use the JSON URL to access data inside the test case.

Step 1: Create a CSV File with Test Data

Sample CSV File:

Save your input data in a CSV file with the entity’s name or description in the first row. Enter values for the entity starting in the second row.

Example:

FirstName,Email,Password,ConfirmPassword
John,JohnSmith1@gmail.com,Welcome@123,Welcome@123
Mike,MikeHenry1@gmail.com,Welcome@123,Welcome@123

Step 2: Convert the CSV File into a URL That Returns JSON Data

There are two ways to access the CSV to JSON converter:

  1. From the TestGrid Dashboard.
  2. From the test case writer screen.

To find the option to convert CSV to JSON, click on More Tools.

 

 

Steps to Convert:

a. Select “CSV to JSON”

 

 

 

  • Navigate to the CSV to JSON screen. Here, you can either:
    • Upload a file, or
    • Write or paste CSV text.

b. Upload File

  • Drop or browse the CSV file into the “DROP HERE” section.
  • Click CONVERT to generate the JSON URL.

c. Write or Paste CSV Text

  • Paste the CSV text into the text area provided.
  • Click CONVERT to generate the JSON URL.

 

Step 3: Copy the JSON URL

Once the CSV file has been converted, copy the JSON URL by clicking on Copy.

 

 

Step 4: Navigate from Test Case Writer Screen

You can also access the CSV to JSON converter from the Test Case Writer screen by selecting the “Is Iterative Test Case?” checkbox.

 

 

Step 5: Use the JSON URL in the Test Case Writer Screen

Paste the copied JSON URL into the designated field. You can find this field in the Note section.

Step 6: Configure Parameterization Settings

a. Click on the Parameterization Setting icon.

b. Click on the Add Group icon.

c. Assign values/capabilities for the declared key using multiple operators and conditions. Save your settings.

 

Step 7: Modify Parameters

To edit or modify parameters in the Test Case Writer screen, click the designated icon. To store the response from the JSON URL:

  • Create a variable of type String, Integer, Double and JSON.
  • Assign the entire JSON response to the variable (e.g., FirstName).

To extract individual values from the JSON response:

  • Declare individual variables.
  • Assign values using the syntax #TGITVAR.<VariableName>.

Example:

#TGITVAR.FirstName

Step 8: Update and Run the Test Case

During runtime, variables such as FirstName, Email, Password, and ConfirmPassword receive the values specified in the JSON data. Observe the values assigned to these variables based on the action type. Use them as per your scenario’s conditions to check and execute tests using only the specified CSV data. Both AND and OR conditions can be applied to the data to validate and utilize it effectively for test data parameterization.

 

Step 9: Multiple JSON values can be passed on to the Tests and set of values can be sent to different tests, those can be seen in the Test case logs.

 

Happy Testing!!!

 

 

Table of Contents