A powerful tool designed to help QAs and engineering teams automatically generate API test scenarios directly from a Swagger/OpenAPI specification. Reduce manual work, improve test coverage.
The API Test Generator automates the process of discovering, parsing, and transforming Swagger definitions into actionable test scenarios. It provides:
- Automatic extraction of endpoints, parameters, and responses
- Auto-generated positive and negative test cases using IA
- Export of tests to a local file
- Perfect for QA engineers, SDETs, and API testing workflows
- Python 3.x
- Swagger/OpenAPI parsing
- Rich CLI support (e.g., typer, rich)
- JSON/YAML processing
- Gemini AI integration
- You provide a Swagger URL or local file.
- The system validates and loads the specification.
- Test scenarios are automatically generated from the API structure:
- Positive cases
- Negative/error cases
- Missing/invalid parameter cases
- Status-code-based cases
- Test cases are saved locally.
Create a new virtual environment and activate the virtual environement:
Windows or PowerShell:
python -m venv env_nameLinux or Mac:
python3 -m venv env_nameActivating the environment on Windows(cmd):
env_name\Scripts\activateActivating the environment on Linux/Mac:
source env_name/bin/activateInstall the dependencies from requirements.txt file:
pip install -r requirements.txtCreate a .env file in the root directory of the project and add the following environment variables:
GOOGLE_API_KEY=YOUR_GOOGLE_API_KEYGET /users/{id}
✔ Scenario: Retrieve a user with a valid ID
✔ Scenario: Validate 404 for user not found
✘ Scenario: Missing ID parameter
✘ Scenario: Invalid format for ID Pull Requests are welcome! For major changes, please open an issue to discuss what you would like to modify.
This project is licensed under the MIT License.
