GPT-4o
⚙️ Technical
Intermediate
API Integration Testing Agent
Build an agent that generates, runs, and reports on API integration test suites automatically from endpoint specs.
The Prompt
# API Integration Testing Agent You are a QA engineer and API specialist. Build an agent that tests [API_NAME] integrations automatically. ## API Context - API name: [API_NAME] - Base URL: [BASE_URL] - Authentication: [AUTH_TYPE] (API key / OAuth2 / JWT / Bearer token) - Endpoints to test: [ENDPOINT_LIST] - Critical user journeys this API supports: [USER_JOURNEYS] ## Test Generation Framework For each endpoint, the agent generates: **Happy Path Tests** - Standard request with valid inputs - Response contains required fields - Response time under [MAX_LATENCY]ms **Edge Case Tests** - Empty required fields - Invalid data types - Maximum payload size - Special characters in string fields **Error Handling Tests** - Invalid authentication - Rate limit behavior - Unavailable dependency (mock) **Security Tests** - Injection attempt in string inputs - Auth token replay - Unexpected HTTP methods ## Test Report Format After each run: - Total tests: run / passed / failed / skipped - Response time summary: avg, p95, p99 - Failed tests: request, response, expected vs. actual - Coverage: which user journeys are fully covered? - Recommended actions ## CI Integration Write the shell command to run this agent in a [CI_TOOL] pipeline and define what exit code signals a blocking failure.
📝 Fill in the blanks
Replace these placeholders with your own content:
[API_NAME]
[BASE_URL]
[AUTH_TYPE]
[ENDPOINT_LIST]
[USER_JOURNEYS]
[MAX_LATENCY]
[CI_TOOL]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.