How to Automatically Generate Dozens of Test Cases with One Click in Apidog Using AI

Writing API test cases manually takes time. With Apidog’s AI Test Case Generation, you can create dozens of complete test cases—covering normal, abnormal, boundary, and security scenarios—in seconds. Run, verify, and manage them instantly to boost testing efficiency.

Oliver Kingsley

Oliver Kingsley

15 October 2025

How to Automatically Generate Dozens of Test Cases with One Click in Apidog Using AI

Writing test cases is one of the most time-consuming parts of API development, as it needs to cover multiple scenarios, such as normal, abnormal, boundary, and security cases. Manually creating these cases usually takes a lot of time.

Fortunately, Apidog now supports automatic AI-generated test cases. Based on your API specs, Apidog's AI feature can intelligently create a complete set of test cases that cover a wide range of scenarios in seconds.

AI-Generated Test Cases in Action

1. One-Click Generation of Dozens of Test Cases

Click the Generate button, and within seconds, you'll see dozens of fully structured test cases appear in your list.

use AI to generate test cases

2. Automatic Categorization by Test Type

Apidog's AI feature automatically classifies the generated test cases into categories such as positive, negative, boundary, and security tests.

Automatic Categorization by Test Type

3. Instant Run and Validation

You can run the generated test cases immediately and view the real-time endpoint responses. There's no need to wait for all test cases to finish generating — you can adopt the valid ones directly into your official test suite.

adopting valid test cases

4. Bulk Operations for Efficient Management

Run, accept, or discard multiple test cases at once. This makes it faster to filter and keep only high-quality test cases.

test cases bulk operations for efficient management

5. Multi-Task Parallel Generation

You can launch several generation tasks simultaneously to compare the results and quality of different AI models.

multi-task parallel generation

Try it yourself in Apidog and experience how AI transforms your testing workflow!

button

How to Enable AI Features

Before you can use the AI Test Case Generation feature, a few simple setup steps are required.

By default, AI features in Apidog are turned off and need to be enabled manually.

  1. Permissions: You must be an organization or team admin (or higher) to configure this feature.
  2. Version: Make sure you've updated Apidog to the latest version.
  3. Enable Path: Go to Organization / Team SettingsAI Features, and enable AI features for your organization or team. Once enabled, all projects within the team can access AI features.
enable AI features in Apidog

Configure Model Providers

After enabling the AI features, you'll need to configure at least one model provider.

Apidog currently supports several model providers by default — including
OpenAI, Anthropic, Google Al studio, and Google Vertex  — and also allows custom API configurations for other providers.

Configure Model Providers

You'll need to provide the following details when configuring:

model provider configuring details

Pro Tip: For the best generation results, choose a powerful model. Less advanced models may produce unsatisfactory results.

If you haven't specified a model for use, Apidog will automatically select one for you. You can also manually choose a specific model as the default one and enable AI-related features you need.

Once everything is configured and AI features are enabled, simply refresh your project, and you'll see the new AI features appear throughout the project interface.

How to Generate Test Cases with AI

In any endpoint's Test Cases tab, you'll find an entry labeled Generate with AI.

generate test cases with AI

Clicking it opens a side panel where you can select which types of test cases to generate — including positive, negative, boundary, and security types and their subcategories.

configuring test case generation rules

If the endpoint requires authentication, Apidog automatically detects and applies the credentials. Keys are encrypted locally, transmitted securely, and decrypted after generation, ensuring both functionality and security.

configuring model credentials

Before generation, you can add extra instructions in the bottom input box to make the AI output more aligned with your expectations.

extra instructions for generating test cases

After you click Generate, AI begins working based on your API specs and configuration. Generated test cases can be run instantly to verify API responses. Accept the cases that meet your needs or discard unwanted ones — and you can also manage multiple at once.

use AI to generate test cases

Note: The more detailed your API specs, the better your AI-generated test cases will be.

For example, if each enum value in your API specs includes clear explanations, Apidog's AI feature can automatically generate cases covering all possible enum values — even using Orthogonal Array Testing methods for optimal combinations.

In future versions, Apidog will support test data configuration in test cases, allowing AI to auto-generate and populate relevant test data, further improving testing efficiency.

More AI Features in Apidog

Beyond test case generation, Apidog's AI feature includes several other smart functions:

Modify Schemas with AI

Enable AI-assisted parameter modification under Organization / Team SettingsAI Features, then refresh your project.

Hover over a schema in the interface, and you'll see the AI feature icon appear — click it to let AI modify your schemas automatically.

05-apidog-01.gif

Endpoint Compliance Check

Enable Endpoint compliance check in AI Features, then refresh your project. After setting up an API design guidelines, you can use AI to verify whether your APIs follow the rules.

Check Endpoint Design Guidelines

AI naming

Enable AI Naming under AI Features, then refresh your project. When editing an endpoint or schema, hover over a field name area — the AI icon will appear, allowing AI to suggest standardized field names based on your team's naming conventions.

Generate field names using AI

Conclusion

Apidog's AI Test Case Generation feature automatically creates a complete set of test cases covering normal, abnormal, boundary, and security scenarios. You can run, verify, and manage these cases instantly and in bulk—saving time, reducing repetitive work, and allowing testers to focus on logic validation and test strategy optimization. This greatly improves overall testing efficiency.

Beyond test case generation, Apidog also provides a range of AI-powered tools designed to simplify and accelerate your API development workflow. For step-by-step guidance, visit the Apidog Help Center.

Explore more

How Can You Master the GPT-5 Search API in 2025?

How Can You Master the GPT-5 Search API in 2025?

Unlock the potential of OpenAI's gpt-5-search-api-2025-10-14 and gpt-5-search-api with this step-by-step technical guide. Developers learn setup, implementation, parameters, and integration strategies for real-time web searches. Leverage Apidog for seamless API testing and optimization

15 October 2025

How to Use AI to Write Test Cases ?

How to Use AI to Write Test Cases ?

Learn how to leverage AI tools to automate and optimize test case creation in software development. This guide covers practical steps with Claude Code and Apidog, helping developers enhance coverage, reduce manual effort, and improve quality assurance.

14 October 2025

How to Use Hyperliquid API

How to Use Hyperliquid API

Master the Hyperliquid API for efficient decentralized trading. This comprehensive technical guide explains authentication, endpoints, order placement, and real-time data handling with the hyperliquid api.

13 October 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs