- GenAI Capabilities
Testsigma Copilot
Generate TDP Using Copilot
Generate Tests from User Actions
Generate Tests from Requirements (Jira)
Generate API Test Cases (Swagger)
Generate Tests from Figma Designs
Testsigma Copilot for Mobile Apps
Agentic Test Generation with GitHub
Generate API Test Cases (Swagger)
With Testsigma, you can now generate API test cases effortlessly by importing Swagger JSON schema files. Simply organize tags for endpoints in the Swagger JSON file, upload the file, and click once to create multiple test cases. This article discusses generating API test cases from Swagger schema files using Testsigma's GenAI capabilities.
Prerequisites
Before you begin, enable AI Features from Settings > Preferences > Generative AI features, and have a Swagger JSON file with tags arranged for endpoints.
📥 Click here to download a sample Swagger JSON file.
Steps to Generate Test Cases from Swagger
- From the left navigation bar, go to Create Tests > Test Cases.
- Click Copilot, and then select Generate from Swagger Schema from the dropdown menu.
- On the Swagger Schema based API Test Case Generation dialog, click Select file to import.
-
Choose the file and click Open.
NOTE:Testsigma Copilot uses tags in the Swagger Schema file to arrange endpoints into test cases. Ensure each endpoint is associated with one or more tags before importing the file.
- In the Available Test Cases section, select the test cases you want to generate and click Generate.
- Wait for Testsigma to generate the test cases along with the test steps.
- From the left panel, select all the test cases you want to include, review the API test steps, validate them, and click Save Test Cases.
- You’ll be redirected to the Test Cases page, where the generated test cases appear under the AI Generated Feature & Scenario.