teckedd-code2save/ai-build-tools/api-test-generator
- community
Checking that the SKILL.md file is still in the repository.
Generates comprehensive API integration tests (using Jest/Supertest, Pytest, etc.) from existing backend repositories, ORM schemas, and router/controller files. Use when a user wants to test their newly provisioned data platform or backend services.
Install
npx vskill@latest install teckedd-code2save/ai-build-tools/api-test-generatorSKILL.md
API Test Generator
Generate production-grade integration tests for existing API endpoints and backend services. This skill ensures that newly provisioned schemas and controllers are fully validated against business requirements.
🎯 When to Use
- After using the
forgeskill to scaffold a new backend. - When adding new endpoints to an existing service.
- When refactoring DTOs, Schemas, or ORM models.
- When generating Postman/Bruno collections for manual API testing.
🛠️ Step-by-Step Workflow
1. Analyze the Backend Structure
- Scan the existing codebase to identify the framework (e.g., Express + TS, FastAPI, Spring Boot, .NET).
- Identify the ORM being used (e.g., Prisma, SQLAlchemy, EF Core).
- Locate the router/controller files to extract the exact endpoint paths, HTTP methods, and expected payloads.
2. Set Up the Test Environment
- Generate the necessary test scaffolding (e.g.,
jest.config.jswithts-jestfor TypeScript, orconftest.pyfor Pytest). - Auto-generate test database setup, teardown, and seeding scripts using the existing ORM. Tests should run against an isolated test database (e.g., a local Docker container) and rollback state between tests.
- Provide instructions or a workflow snippet for running the tests (e.g.,
npm run test:e2e).
3. Generate Integration Tests
For every identified endpoint, generate tests that cover:
- Happy Path: 200 OK or 201 Created with valid payloads. Verify the response shape against the API contract.
- Validation Errors: 400 Bad Request triggers by sending missing required fields, incorrect types, or boundary violations.
- Not Found / Edge Cases: 404 Not Found handling for invalid IDs.
- Auth / Permissions (if applicable): 401 Unauthorized or 403 Forbidden checks.
Example TypeScript + Jest + Supertest:
4. Provide API Collections (Optional)
If requested, output a JSON collection for Postman or Bruno. This allows the user to easily import the endpoints and play with them manually. Make sure to parameterize base URLs using environment variables like {{baseUrl}}.
⚙️ Best Practices
- Never mock the database for integration tests if it can be avoided. Tests should hit a real test database instance to ensure ORM queries behave exactly as they will in production.
- Clear state between tests. Use ORM capabilities to truncate tables or rollback transactions before every test case to prevent flakiness.
- Use factories. Leverage libraries like
faker.jsorfactory_boyto create realistic test payloads instead of hardcoding'test'everywhere.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/api-test-generator/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Oct 2026, 9 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/teckedd-code2save/ai-build-tools/api-test-generator)