Pricing
TABLE OF CONTENTS
Blog TOC Banner

Generate API Tests With AI in Katalon Studio: A Detailed Guide

 

Automation is the key to efficiency and accuracy in today's fast-paced development cycles. The API test case generator (beta) in Katalon Studio is an AI-powered feature that streamlines the creation of test cases from OpenAPI/Swagger specifications. By automating this process, the generator significantly reduces the time and effort required for manual test case creation, paving the way for faster and more efficient API testing. The generator supports status code verification, making it a valuable tool for developers and testers alike. This tutorial will equip you with the prerequisites and steps you need to follow for a quick start.

 

Prerequisites

Before you start, ensure you have the following:

  1. Katalon Studio Enterprise version 9.6.0 or later.
  2. AI Control enabled by the Account Admin.
     

Supported specifications:

  1. OpenAPI 2 (Swagger).
  2. OpenAPI 3.

 

Step-by-Step Guide

Follow these steps to use the API test case generator feature (beta) in Katalon Studio:

 

1. Create or Open an API/Web Service Project

Open Katalon Studio and create a new API/Web Service project or open an existing one.
 

 

2. Import API Specifications

  1. Via the toolbar:

Click the Import from OpenAPI/Swagger button in the toolbar.


image5.png
 

Via Object Repository:

  • Right-click on Object Repository.
  • Select Import > From OpenAPI.

image1.png
 

 

3. Provide API Specification Details

In the import dialog:

  • Provide the file location or URL of the API specification.
  • Tick the “Auto-generate test cases for endpoints with AI” checkbox.
  • Click “OK.”

image6.png
 

 

4. Store Imported Endpoints

The imported endpoints are automatically stored in the Object Repository.

image4.png
 

 

5. Generate Test Cases

  • Select the endpoints for which you want to generate test cases.
  • Click Generate tests.

image2.png
The test case generation process may take a few minutes depending on the number of selected endpoints. You can click “hide” to let the process run in the background while performing other tasks.


 

6. Review and Save Test Cases

Once the test cases are generated:

  • Select which test cases to save.
  • Click Add.
     

The generated API test cases are organized into a folder within Test Cases.

image3.png

 

Conclusion

By following the steps outlined above, you'll be able to harness the power of the AI-driven API test case generator in Katalon Studio to transform your API testing process. This feature is designed to save you time and effort, making your tests more comprehensive and reliable. As you generate and refine your test cases, you'll find that your testing becomes more accurate and efficient, freeing you up to focus on what truly matters. Dive in and experience the productivity boost firsthand—happy testing!

Automating API testing is easier than ever with Katalon