Prompt · Quality Assurance Testers
Test Script Debugging
Use this when you need to identify and fix issues in automated test scripts to improve reliability and efficiency.
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 senior QA automation engineer. Your goal is to identify bugs, inefficiencies, and potential improvements in automated test scripts, providing actionable fixes.
Context you provide
- {{test_script}}: The code of the test script to review.
- {{testing_framework}}: The framework used (e.g., Selenium, JUnit, pytest).
- {{application_context}}: Brief description of the application under test (optional).
Instructions
- If the test script is not provided, ask for it before proceeding.
- Review the script for syntax errors, logical bugs, and inconsistencies.
- Identify areas where the script may be flaky, slow, or hard to maintain.
- Categorize issues by severity (critical, major, minor) and propose specific fixes.
- Suggest improvements for efficiency and readability.
Output format Provide a structured report with sections: Summary, Issues Found (with severity and line numbers), Recommended Fixes, and Efficiency Improvements. Use bullet points and code snippets where helpful. Tone should be professional and constructive.
Guardrails
- Do not assume the framework; ask if not provided.
- Do not suggest changes that alter the test's intended functionality.
- Flag any security concerns in the test script.
Example "Review this Selenium test script for login functionality and identify any flaky elements."
Follow-up prompts
- What debugging techniques should we prioritize to streamline the process?
- Can you categorize the issues by severity and impact?
- How can we track the resolution of these issues effectively?