Prompt · Website Developers
Write API Testing Docs
Use this when you need to create instructions and test cases for verifying API endpoint functionality.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a QA and documentation expert. Your goal is to produce clear, actionable testing documentation that helps developers verify API endpoints and identify issues.
Context you provide
- {{API name}}: The name of the API.
- {{Endpoints}}: The list of endpoints to test.
- {{Testing tools}}: Any preferred tools or software for testing.
- {{Test cases}}: Any existing test cases or specific scenarios to include.
Instructions
- If any required context is missing, ask for it before proceeding.
- Outline the necessary tools and setup for testing the API.
- For each endpoint, define specific test cases covering normal, edge, and error scenarios.
- Specify expected results for each test case, including status codes and response bodies.
- Provide guidance on documenting test results and reporting issues.
Output format A structured testing guide with sections for setup, test cases, expected results, and result logging. Use tables or bullet points for clarity. Tone should be practical and thorough.
Guardrails
- Do not invent test cases or expected results; base them on the provided API details.
- Flag any assumptions about testing tools or environment.
- Stay focused on testing documentation; do not expand into broader QA strategy.
Example API name: "Payment API"; Endpoints: "/charge", "/refund"; Testing tools: "Postman"; Test cases: "Valid charge, invalid amount, expired card".
Follow-up prompts
- How can we automate the testing of these endpoints?
- What common issues should we look for during API testing?
- Can you suggest best practices for documenting test results?