Katalon AI Assistant: A Guide to Data-Driven Testing and Reusing AI-Generated Test Cases

studioassist data driven testing ai generated test cases

A step-by-step cookbook for Katalon AI Assistant in Katalon Studio: generate custom keywords from plain-language prompts, reuse them in new scripts, and generate CSV test data for data-driven testing.

Key takeaways
The 30-second version of this article
Katalon AI Assistant turns plain-language prompts into custom keywords and test scripts inside Katalon Studio.
Highlight a prompt and press Ctrl + Shift + C (Windows) or ^ + ⌥ + C (macOS) to generate code.
Mention an existing custom keyword in your prompt to reuse it in newly generated scripts.
Generate CSV test data with AI, bind it to a test case, and prompt the assistant to write a data-driven test.

As a software tester, you constantly look for ways to streamline your workflow and enhance your testing capabilities. Katalon AI Assistant, an intelligent feature in Katalon Studio, is designed to make your life easier by automating repetitive tasks and generating efficient test scripts. This blog will serve as your cookbook, providing you with step-by-step instructions on how to get the most out of Katalon AI Assistant. We'll cover two key use cases: data-driven testing with custom keywords and reusing AI-generated test cases and custom keywords.

Data-driven testing with Katalon AI Assistant

Data-driven testing allows you to execute test scripts with multiple sets of data, making your tests more comprehensive and reliable. Here's how you can generate and reuse a custom keyword with Katalon AI Assistant:

Step 1: Generate a custom keyword

Start by navigating to the Script tab. In the Keywords folder, create a new class named MyCustomKeyword.

Prepare a prompt that explains the behavior of your custom keyword in plain language. Here is an example.

image16.png

Step 2: Generate the code

Highlight your prompt and trigger Katalon AI Assistant to generate the code. You can do this by right-clicking and selecting Katalon AI Assistant → Generate Code or using the hotkeys Ctrl + Shift + C for Windows or ^ + ⌥ + C for macOS.

image15.png

Step 3: Review the generated keyword

Katalon AI Assistant will generate the custom keyword and place it right below your prompt.

image14.png

Step 4: Execute the script

Now execute the script in Studio to ensure it works as expected.

image5.png

Reusing AI-generated test cases and custom keywords

Reusability is key to efficient testing. Katalon AI Assistant enables you to reuse generated custom keywords across different test scripts, saving you time and effort. Here’s how:

Step 1: Prepare your prompt

Prepare a prompt that mentions the custom keyword you want to reuse. For example, to reuse the clickElement custom keyword, your prompt could be:

Use the clickElement custom keyword to click on the submit button of the login form.

image8.png

Step 2: Generate the test script

Highlight your prompt and trigger Katalon AI Assistant to generate the code, just as you did before.

image7.png

Katalon AI Assistant will generate a test script that incorporates the previously created custom keyword.

Step 3: Execute your test script

Finally, execute your test script to ensure it works as expected. 

image18.png

Advanced use case: Generate test data and perform data-driven testing

In this advanced use case, you'll learn how to generate test data and perform data-driven testing using Katalon AI Assistant.

Step 1: Generate test data

Prepare a prompt in plain language requesting Katalon AI Assistant to generate test data in CSV form. For example:

Generate test data for user login credentials and save it in CSV format.
 

image12.png

Step 2: Generate the code

Highlight your prompt and trigger Katalon AI Assistant to generate the code.

image10.png

Step 3: Execute the script

Once the script is generated, execute it to create the test data. The data will be saved as Data Files/data.csv inside your project. You can access the data in the Data Files folder.

Prompt Katalon AI Assistant to reuse the generated test data for Data-driven testing

For more details on Data-driven testing at test case level in Katalon Studio, see here.

Step 4: Create test data in Katalon Studio

In the Test Explorer, create a Test Data by right-clicking on the Data Files folder and selecting New Test Data. Browse to the generated test data, and it will be loaded into a table.

image13.png
image11.png

Step 5: Create a new test case

Create a new test case and go to the Data Binding tab. Click Add to bind the test data to your test case. Select the test data you created in the Data Files folder and click OK.

image2.png

Step 6: Map all variables

Click Map All to populate the data in the Variable Binding table.

image17.png

Step 7: Write a prompt for data-driven testing

Go to the Script tab and write a prompt in plain language to use the test data. For example:

Use the test data to perform a login test for multiple users.
 

image6.png

Step 8: Generate the test script

Highlight the prompt and trigger Katalon AI Assistant to generate the code. Katalon AI Assistant will generate a test script using the previously created test data.

image1.png

Step 9: Execute your test script

Execute your test script to verify it works as expected.

image3.png

You May Be Interested In:

  1.  AI-Powered API Test Generation in Katalon Studio
  2. Mastering Katalon AI Assistant: Efficient Mobile, API, and Web Testing
  3. Master Katalon AI Assistant: A quick guide to summarizing and explaining code in Katalon Studio

Conclusion

Katalon AI Assistant can significantly improve your testing efficiency. By using its capabilities for data-driven testing and reusing AI-generated test cases, you can save time and ensure your tests are thorough and reliable. 

Ready to streamline your testing process? Try Katalon AI Assistant now and experience the difference.

Download Katalon Studio

Frequently asked questions

Son Huynh
Son HuynhSupport Engineer

Son Huynh is a Support Engineer at Katalon, based in Ho Chi Minh City, where he helps customers solve technical issues across the Katalon platform. Before joining Katalon in 2025, he spent three years as a Professional Services Engineer at ELCA Vietnam. He studied at California State Polytechnic University, Pomona.

Connect on LinkedIn →
Get started

Test everything. Ship with confidence.

From generating test cases to spotting failures, Katalon's AI works across your entire pipeline, automatically.

Live webinar

The Next Evolution of Manual Testing: Introducing Katalon AI Test Runner

Learn how to grow your QA team's capacity in the age of AI, then watch Katalon AI Test Runner turn manual test cases into automated runs, live.

2:00 to 3:00 PM IST
Almas AhmedSenior Account Manager
Sumit WankhedeSolutions Engineer Manager
Register now