Synaptic SkillsSynapticSkills
MarketplaceSkill GraphCriar SkillMCP ServerPlataformaEnterprise
v0.1.0-beta
Voltar ao Marketplace
AutomationMédioAuto-Sync

API Test Generator

porTHIAGONOMA·THIAGONOMA· v1.9.1 · atualizado em 2026-04-12T22:48:11.498Z
88
Score

Gera testes de API automatizados: unitários com mocks, integração com banco real e E2E com Playwright. Cobre cenários de autenticação, validação, rate limiting e edge cases baseados no schema OpenAPI.

api-testingintegration-testssupertestplaywrightopenapimockingtest-automation
Linguagens
TypeScriptJavaScriptPython
1.8KStars
176Forks
29.8KUsos
Fork

Documento do Skill

SKILL.mdapi-test-generator/workflow
Passo-a-passo detalhado do skill, referenciando as fases cognitivas:
1
SENSE — Mapear endpoints
Ler OpenAPI spec ou rodar `curl -s localhost:3000/api/docs/json | jq '.paths | keys'`
Identificar quais endpoints têm autenticação (Bearer, API key, session)
2
RECOMMEND — Setup de testes de integração (Vitest + Supertest)
```typescript
// tests/api/setup.ts
import { app } from '../../src/app';
import { db } from '../../src/lib/db';
import request from 'supertest';
export const api = request(app);
export async function createTestUser() {
return db.user.create({
data: { name: 'Test User', email: `test+${Date.now()}@test.com`, role: 'user' },
});
}
export async function getAuthToken(userId: string): Promise<string> {
return signJWT({ sub: userId, role: 'user' }, { expiresIn: '1h' });
}
```
3
RECOMMEND — Gerar testes de endpoint
```typescript
// tests/api/users.test.ts
describe('GET /api/v1/users/:id', () => {
let user: User;
let token: string;
beforeEach(async () => {
user = await createTestUser();
token = await getAuthToken(user.id);
});
afterEach(async () => {
await db.user.delete({ where: { id: user.id } });
});
it('returns user data for valid ID', async () => {
const res = await api.get(`/api/v1/users/${user.id}`)
.set('Authorization', `Bearer ${token}`)
.expect(200);
expect(res.body).toMatchObject({
id: user.id, name: user.name, email: user.email,
});
expect(res.body.password).toBeUndefined(); // nunca expor senha
});
it('returns 401 without authentication', () => {
return api.get(`/api/v1/users/${user.id}`).expect(401);
});
it('returns 403 for other user ID', async () => {
const otherUser = await createTestUser();
await api.get(`/api/v1/users/${otherUser.id}`)
.set('Authorization', `Bearer ${token}`)
.expect(403);
await db.user.delete({ where: { id: otherUser.id } });
});
it('returns 404 for non-existent ID', () => {
return api.get('/api/v1/users/00000000-0000-0000-0000-000000000000')
.set('Authorization', `Bearer ${token}`)
.expect(404);
});
});
```
4
EVALUATE — Rodar e verificar cobertura
```bash
vitest run --coverage tests/api/
# Verificar que todos os endpoints têm cobertura > 80%
```
5
REFLECT — Integrar no CI
```yaml
# .github/workflows/ci.yml
test-api:
services:
postgres: { image: postgres:16, env: { POSTGRES_PASSWORD: test } }
steps:
run: npm test:api -- --coverage
```
Reportar telemetria via mcp-skillschain

Telemetria de Agentes

Execuções
0
total
Taxa de Sucesso
0%
últimos 30d
Latência Média
0.0s
p50
Alucinação
0.0%
detecção
Tokens Entrada
0
avg 0/exec
Tokens Saída
0
avg 0/exec

Uso por Plataforma

Skills Relacionados

Compõe comCode Reviewer
21%
Hebbian Synapse
Composite0.210
w = 0.3·α + 0.5·β + 0.2·γ
94
Compõe comTest Data Generator
21%
Hebbian Synapse
Composite0.210
w = 0.3·α + 0.5·β + 0.2·γ
83
Compõe com ←Code Reviewer
21%
Hebbian Synapse
Composite0.210
w = 0.3·α + 0.5·β + 0.2·γ
94
Compõe com ←REST API Builder
21%
Hebbian Synapse
Composite0.210
w = 0.3·α + 0.5·β + 0.2·γ
90
Compõe com ←SOLID Refactor
21%
Hebbian Synapse
Composite0.210
w = 0.3·α + 0.5·β + 0.2·γ
82
Similar a ←Web Application Testing
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←Playwright Interactive Skill
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←Playwright CLI Skill
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
80
Similar a ←Screenshot Capture
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
80
Similar a ←Autoresearch: Autonomous Iterative Experimentation
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←Test Planning & Quality Assurance Prompt
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
80
Similar a ←Chrome DevTools Agent
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
80
Similar a ←Creating Bug Reports for Oracle-to-PostgreSQL Migration
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
78
Similar a ←Creating Integration Tests for Oracle-to-PostgreSQL Migration
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
79
Similar a ←MSTest Best Practices (MSTest 3.x/4.x)
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
79
Similar a ←NUnit Best Practices
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
80
Similar a ←TUnit Best Practices
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
82
Similar a ←XUnit Best Practices
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←Evaluation-Driven Development for Python LLM Applications
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←JUnit 5+ Best Practices
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←javascript-typescript-jest
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
82
Similar a ←Planning Integration Testing for Oracle-to-PostgreSQL Migration
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
76
Similar a ←Automating Filling in a Form with Playwright MCP
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
78
Similar a ←Website Exploration for Testing
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
79
Similar a ←Test Generation with Playwright MCP
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
82
Similar a ←Polyglot Test Generation Skill
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
81
Similar a ←pytest-coverage
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←Quality Playbook Generator
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
85
Similar a ←Scaffolding an Integration Test Project for Oracle-to-PostgreSQL Migration
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
78
Similar a ←ScoutQA Testing Skill
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
85
Similar a ←Spring Boot Testing
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
79
Similar a ←unit-test-vue-pinia
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
80
Similar a ←Web Application Testing
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←A/B Test Setup
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
85
Co-executedCode Reviewer
41%
Hebbian Synapse
Composite0.409
w = 0.3·α + 0.5·β + 0.2·γ
94
Co-executedTest Data Generator
40%
Hebbian Synapse
Composite0.400
w = 0.3·α + 0.5·β + 0.2·γ
83
Co-executedGit Diff Parser
40%
Hebbian Synapse
Composite0.400
w = 0.3·α + 0.5·β + 0.2·γ
86
Co-executedSOLID Refactor
40%
Hebbian Synapse
Composite0.400
w = 0.3·α + 0.5·β + 0.2·γ
82

Árvore do Skill

API Test Generator
api-test-generator
Fases Cognitivas6
1.SENSE: Percepção
2.CONTEXTUALIZE: Contextualização
3.HYPOTHESIZE: Hipótese
4.RECOMMEND: Recomendação
5.EVALUATE: Avaliação
6.REFLECT: Reflexão
Triggers14
generate API testscriar testes de APItest endpointstestar APIapi test generationintegration testssupertestplaywright apipostman collectiontest REST endpointsapi testingcontract testingsmoke testsgerar testes automatizados

Avaliar este Skill

Score Breakdown

⭐Avaliação Humana0%
🤖Sucesso de Agentes0%
🕐Atualidade100%
🔗Saúde de Dependências100%
🕸️Centralidade no Grafo0%
🛡️Segurança50%
CompositeScore = α·Humano + β·Agente + γ·Recência + δ·Deps + ε·Centralidade + ζ·Segurança

Instalação

$ synaptic mcp download api-test-generator
$ synaptic skills detail api-test-generator
$ synaptic skills live api-test-generator

Links

GitHub Repository