What problem does it solve?
It eliminates the manual, repetitive effort of writing comprehensive API tests by generating coverage for common behaviors like successful responses, authorization rules, validation errors, and edge cases.
Core Features & Use Cases
- Endpoint scanning: Detects API Platform routes or Express-like endpoints by reading API metadata and available routes.
- Test generation by scope: Supports generating tests for a specific endpoint, an entity, a full domain, or by analyzing existing coverage to propose missing tests.
- Authorization, validation, and limits: Produces nominal tests plus tests for forbidden/unauthenticated access, invalid payloads, missing fields, and non-existent or empty-resource scenarios.
- Framework-aligned output: Targets PHPUnit-style ApiTestCase (Symfony) and follows repository test conventions with helpers and fixtures.
Quick Start
Ask api-test-gen to generate PHPUnit ApiTestCase coverage for the domain you specify using the existing API routes and conventions in your project.