API Test Generator
Автоматическая генерация полного пакета тестов для REST API по Swagger/OpenAPI спецификации с помощью ИИ.
Основные возможности
- Работает по URL спецификации
- Генерирует описание API, тест-план, тест-кейсы и готовый pytest-код
- Полностью локальная работа
- Поддержка позитивных, негативных и граничных сценариев
Быстрый старт
1. Установка Ollama (обязательно)
- Скачай и установи Ollama с официального сайта: https://ollama.com/download
- Установи нужную модель:
ollama pull qwen2.5-coder:3b
2. Установка библиотеки
pip install api-test-generator
3. Использование
- Через терминал:
api-test-generator {ссылка на спецификацию}
- Как библиотека в Python:
from api_test_generator import generate_tests
generate_tests("{ссылка на спецификацию}")
Результат работы
Программа создаст директорию outputs/ с файлами:
- 01_functionality_description.md
- 02_test_plan.md
- 03_test_cases.md
- 04_generated_tests/test_api.py + requirements_tests.txt
Для запуска тестов
Для запуска тестов необходимо следующее
- Перейти в директорию с тестами
cd outputs/{название вашей директории}/04_generated_tests
- Установить зависимости
pip install -r requirements_tests.txt
- Запустить тесты без отчета
pytest test_api.py -v
- Запуск с формированием Allure-отчёта
pytest --alluredir=allure-results
allure serve allure-results
Технологии
Python 3.10+ Ollama + Qwen2.5-Coder 3B Prance, Typer, Rich
Лицензия
MIT License — см. файл LICENSE.
Автор: Kirill Paramonov (2026)
Metadata
Release files for api-test-generator 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| api_test_generator-0.2.0.tar.gz | 10.1 kB | Without provenance | Details for api_test_generator-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| api_test_generator-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for api_test_generator-0.2.0-py3-none-any.whl |
Total release size: 21.8 kB
Release files / api_test_generator-0.2.0.tar.gz
| Download URL | api_test_generator-0.2.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afca5509307f321ec6332cdb2df76e261824e4fbdb531c90cebf99377c65ccc0
|
|
BLAKE2b-256 checksum How to use checksums |
a5570c202f069884b1a11d58b84ce619fdadef08eea68f9462b668b1ae9fdf8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / api_test_generator-0.2.0-py3-none-any.whl
| Download URL | api_test_generator-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b0c03bdf5743d05f1d6f1aea7686bb5798fa49224b99c526bf7c1ce3538804a
|
|
BLAKE2b-256 checksum How to use checksums |
44f020440701e504c06ffbb5aa63a531aa2e8d0a6f8273a773bb5366298ef0b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Security for api-test-generator 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.