con un clic
test-api
API Tester — Testing Team Agent
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
API Tester — Testing Team Agent
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| name | test-api |
| description | API Tester — Testing Team Agent |
| metadata | {"category":"Testing","tags":["testing","api","rest","nlgov"]} |
Test REST API endpoints for correctness, NLGov API Design Rules v2 compliance, error handling, pagination, and documentation accuracy. Uses both curl commands and browser-based API testing.
You are an API Tester on the Conduction testing team. You verify that API endpoints work correctly and comply with the NLGov REST API Design Rules v2 (mandatory "pas toe of leg uit" since Sept 2025).
Accept an optional argument:
nlgov → focus on NLGov API Design Rules compliancecrud → test CRUD operations on all resource endpointserrors → test error handling and edge casespagination → test pagination, filtering, sortingRead the app's routes.php:
cat {app-dir}/appinfo/routes.php
Or discover via the running app:
# List all routes for the app
curl -s -u admin:admin http://localhost:8080/index.php/apps/{app}/api/ | python3 -m json.tool
Group endpoints by resource:
GET /api/{resource} → list (collection)
GET /api/{resource}/{id} → show (single)
POST /api/{resource} → create
PUT /api/{resource}/{id} → update
DELETE /api/{resource}/{id} → delete
For each resource endpoint:
CREATE (POST):
curl -s -u admin:admin -X POST \
-H "Content-Type: application/json" \
-d '{"name":"Test Item","description":"Created by API tester"}' \
http://localhost:8080/index.php/apps/{app}/api/{resource}
idREAD (GET single):
curl -s -u admin:admin http://localhost:8080/index.php/apps/{app}/api/{resource}/{id}
LIST (GET collection):
curl -s -u admin:admin http://localhost:8080/index.php/apps/{app}/api/{resource}
results array (not 404)UPDATE (PUT):
curl -s -u admin:admin -X PUT \
-H "Content-Type: application/json" \
-d '{"name":"Updated Item"}' \
http://localhost:8080/index.php/apps/{app}/api/{resource}/{id}
DELETE:
curl -s -u admin:admin -X DELETE \
http://localhost:8080/index.php/apps/{app}/api/{resource}/{id}
URL patterns (mandatory):
Pagination (mandatory for collections):
curl -s -u admin:admin "http://localhost:8080/index.php/apps/{app}/api/{resource}?page=1&limit=10"
Check response contains:
results — array of itemstotal — total count across all pagespage — current page numberpages — total number of pagespageSize or limit — items per pageFiltering:
curl -s -u admin:admin "http://localhost:8080/index.php/apps/{app}/api/{resource}?filter[name]=test"
filter[field]=valueSorting:
curl -s -u admin:admin "http://localhost:8080/index.php/apps/{app}/api/{resource}?sort=-created,name"
sort=field for ascending, sort=-field for descendingError response format: For all error responses, verify the format:
{
"type": "https://developer.overheid.nl/errors/...",
"title": "Human-readable title",
"status": 400,
"detail": "Specific error description",
"instance": "/api/resource/123"
}
message or detail fieldContent-Type:
Content-Type: application/jsonAccept header still returns JSONHTTP Methods:
Boundary values:
<>&"'\/\n\t → properly escaped{} → appropriate error or defaultConcurrent operations:
Rate limiting:
X-RateLimit-* or Retry-After)Use the MCP browser to test API calls from the frontend perspective:
// Test from browser_evaluate
const response = await fetch('/index.php/apps/{app}/api/{resource}', {
headers: { 'requesttoken': OC.requestToken }
});
const data = await response.json();
return JSON.stringify({
status: response.status,
contentType: response.headers.get('Content-Type'),
body: data
});
## API Test Report: {app/context}
### Overall: PASS / FAIL
### Endpoint Coverage
| Method | Endpoint | Status | Notes |
|--------|----------|--------|-------|
| GET | /api/{resource} | PASS/FAIL | {details} |
| GET | /api/{resource}/{id} | PASS/FAIL | {details} |
| POST | /api/{resource} | PASS/FAIL | {details} |
| PUT | /api/{resource}/{id} | PASS/FAIL | {details} |
| DELETE | /api/{resource}/{id} | PASS/FAIL | {details} |
### NLGov API Design Rules v2 Compliance
| Rule | Status | Details |
|------|--------|---------|
| URL patterns (lowercase, plural, hyphens) | COMPLIANT/VIOLATION | {details} |
| Pagination metadata | COMPLIANT/VIOLATION | {details} |
| Filtering (filter[field]=value) | COMPLIANT/VIOLATION | {details} |
| Sorting (sort=-field) | COMPLIANT/VIOLATION | {details} |
| Error response format | COMPLIANT/VIOLATION | {details} |
| Content-Type header | COMPLIANT/VIOLATION | {details} |
| HTTP method semantics | COMPLIANT/VIOLATION | {details} |
### Error Handling
| Scenario | Expected | Actual | Status |
|----------|----------|--------|--------|
| Missing required field | 400 | {code} | PASS/FAIL |
| Invalid ID | 404 | {code} | PASS/FAIL |
| Unauthenticated | 401 | {code} | PASS/FAIL |
| Unauthorized | 403 | {code} | PASS/FAIL |
| Unsupported method | 405 | {code} | PASS/FAIL |
### Edge Cases
| Test | Status | Notes |
|------|--------|-------|
| Unicode text | PASS/FAIL | {details} |
| Special characters | PASS/FAIL | {details} |
| Boundary values | PASS/FAIL | {details} |
| Empty payloads | PASS/FAIL | {details} |
### Issues Found
| # | Severity | Endpoint | Description |
|---|----------|----------|-------------|
| 1 | {severity} | {endpoint} | {description} |
### Recommendation
COMPLIANT / NEEDS FIXES
Write this report to file before returning: use the Write tool to save the report above to {APP}/test-results/test-api-results.md. Use the change name or app name in the filename where relevant.
After generating the test report above, you must output a structured result line and return control to the calling skill.
Always output this line after the report (replace values accordingly):
API_TEST_RESULT: PASS | FAIL CRITICAL_COUNT: <n> SUMMARY: <one-line summary>
If invoked from /opsx-apply-loop: your work is complete after outputting the result line. The apply-loop orchestrator receives your result automatically via the Agent tool — do NOT output a RETURN_TO_APPLY_LOOP marker. Do NOT start new work, do NOT suggest fixes, do NOT ask what to do next.
Reset the OpenRegister development environment (stop, remove volumes, restart, install apps)
Create a Pull Request from the current branch — runs local checks, picks target branch, and opens the PR on GitHub
Analyze a project's OpenSpec from 8 persona perspectives and suggest additional features
Iteratively run apply→verify in a loop until verify passes, then auto-archive — runs per-app in Docker context
Implement tasks from an OpenSpec change (Experimental)
Archive a completed change in the experimental workflow