Data Builder FREE

Katalon Test Data Generator simplifies the creation of diverse and realistic test data. It supports generating data for various formats and scenarios, enhancing test coverage. An essential tool for efficient and effective test data management.

50

How to Generate Random Test Data with Katalon Studio?

Randomized test data is essential for robust and dynamic test automation. Katalon Studio makes it easy with the Data Builder Plugin. Here's how you can use it effectively:

Use Case 1: Prepare Test Data for Data-Driven Testing

Step 1: Install the Katalon Test Data Builder Plugin

Step 2: Open the Data Builder UI

  • Click the DataBuilder icon in Katalon Studio to access the interface.

Step 3: Enter Required Details

  • Fill in fields like:
  • File Name
  • Variable Name
  • Count (number of rows of data to generate)

Step 4: Create the Table

  • Click Create Table and define:
  • Headers
  • Sample Values (Refer to "Sample Data Format" for guidance)

Step 5: Generate Data

  • Click Generate Data to populate your Katalon Data file with randomized values.

Step 6: Use the Generated Data

  • The generated test data is now ready to bind with variables for data-driven testing.
  • Examples: Generating Different Random Data

Input Format | Output Example | Notes

  • Full Name: Mohit{123} | Mohit432 | Values within {} are generated randomly.
  • Phone Number: +94{56823512} | 9470294386 | Generates an 8-digit number after +94.
  • Start Date: 2025/{1::6}/{1::15} | 2025/5/5 | {1::6} generates a number between 1 and 6.
  • End Date: 2025-{6::12}-{16::31} | 2025-11-25 | Generates random months and days within ranges.
  • Date & Time: 202405{1::30}:{1::12}{1::30}33 | 20240528:62820 | Randomizes the date and time format.
  • Email Address: {Mohit}{123}@gmail.com | Omoho718@gmail.com | Combines random letters and numbers.
  • Custom String: {Mohit}{123}IRE{20345}STR-{1230}{MT}01STR{2025} | Toiio315IRE69027STR-7185MM01STR8107 | Custom patterns for any data requirement.

Use Case 2: Generate Random Test Data Directly in Test Cases

  • Download version 1.0.0 ONLY of the plugin from the ChangeLog
  • Add the downloaded file to the Plugins folder in your Katalon Studio project and Reload the Plugin.
  • Call the getRandomValue method in your test case and save the output to a variable:
  • def randomEmail = CustomKeywords.'com.katalon.plugin.databuilder.getRandomValue'('{Mohit}{123}@gmail.com')
  • Use the generated variable as input for other Katalon keywords:
  • WebUI.setText(findTestObject('Object Repository/Input_Email'), randomEmail)

Why Use the Data Builder Plugin?

  • Easily generate dynamic and custom patterns for test data.
  • Simplifies data-driven testing by automating data creation.
  • Supports a flexible {} syntax to randomize values within specified ranges.
  • Leverage this plugin to enhance your test automation workflow!

Visit Katalon Forum for Plugin related discussions.

4.5
2 Rating(s)
Aisyah Jailani
December 4, 2024

"Why are you changing a system that is already successful and functioning properly?" Exactly. My regression testing require a lot of random test data generations and now I need to use new plugins that do not have a proper documentations or tutorials on how to use it. I hope you will provide the documentations in the near future because the information provided in the Q&A here is not very helping. Thank you.

mohit.kumar
December 31, 2024

Hi @Aisyah, We’ve enhanced the plugin with a few additional capabilities. However, you can still invoke the custom function in your test cases to generate values dynamically at runtime. Please follow the steps outlined below: Use Case 2: Generate Random Test Data Directly in Test Cases Download version 1.0.0 of the plugin from the ChangeLog. Add the downloaded file to the Plugins folder in your Katalon Studio project. Call the generateRandomData method in your test case and save the output to a variable: def randomEmail = CustomKeywords.'com.katalon.plugin.databuilder.generateRandomData'('{Mohit}{123}@gmail.com') Use the generated variable as input for other Katalon keywords: WebUI.setText(findTestObject('Object Repository/Input_Email'), randomEmail)

Bektas Kilic
November 24, 2024

It's easy to use!.. Thanks to everyone who contributed. Edit : Due to a sudden update, my automation stopped working, and I spent 4 hours fixing it. Why are you changing a system that is already successful and functioning properly? You are providing a global service, and I recommend proceeding carefully by considering what even the smallest update might alter while continuing your successful progress.

Bektas Kilic
January 4, 2025

Thank you very much for your interest and response. Unfortunately, I still haven't gotten used to the new updated version. But I got used to the old version and it is very useful. I was recommending it to all my friends who use Katalon, I was also surprised when I suddenly saw the new version.

mohit.kumar
December 31, 2024

We’ve enhanced the plugin with a few additional capabilities. However, you can still invoke the custom function in your test cases to generate values dynamically at runtime. Please follow the steps outlined below: Download version 1.0.0 ONLY of the plugin from the ChangeLog Add the downloaded file to the Plugins folder in your Katalon Studio project and Reload the Plugin. Call the getRandomValue method in your test case and save the output to a variable: def randomEmail = CustomKeywords.'com.katalon.plugin.databuilder.getRandomValue'('{Mohit}{123}@gmail.com') Use the generated variable as input for other Katalon keywords: WebUI.setText(findTestObject('Object Repository/Input_Email'), randomEmail)

API keys are required in Katalon Studio Commandline Execution. Generate Key
Information
Project details
Version
2.0.5
Type
Katalon Studio Plugin
Last updated
December 31, 2024 2:30 pm
Publisher
Privacy and License Agreement