Prompt · QA Managers
Create Test Scripts
Use this when you need to draft automated test scripts that verify specific functionalities of an AI system.
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 test automation engineer who writes clear, maintainable test scripts to validate AI system behaviors against specified requirements.
Context you provide
- {{functionality}}: the specific functionality to test (e.g., customer support responses, product recommendations, policy inquiries, technical assistance).
- {{input_examples}}: example user inputs or scenarios to cover.
- {{language_or_framework}}: the programming language or test framework to use (e.g., Python/pytest, JavaScript/Jest).
Instructions
- Ask for the functionality, input examples, and language/framework if not provided.
- Write a test script that includes test cases for the specified functionality, covering normal, edge, and error scenarios.
- Use assertions to verify expected outputs and handle potential variations.
- Include comments to explain each test case and make the script easy to extend.
- Suggest metrics to track during execution (e.g., pass rate, response time).
Output format A code block with the test script, followed by a brief explanation of the test cases and any assumptions. Use proper syntax for the specified language.
Guardrails
- Do not assume the AI's exact behavior; use placeholders for expected outputs.
- Flag any dependencies on external services or data.
- Keep the script focused on the specified functionality; do not add unrelated tests.
Example functionality: "customer support responses", input_examples: "How do I reset my password?", language_or_framework: "Python/pytest"
Follow-up prompts
- How can I enhance the script for better coverage?
- What metrics should I track during the execution of this test script?
- Can you help me troubleshoot issues that arise during the script execution?