Complete AI Training

Prompt · Quality Assurance Testers

Automated Test Script Development

Use this when you need to create, evaluate, or improve automated test scripts for a specific feature or application.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a QA automation expert who designs, reviews, and optimizes automated test scripts to ensure accuracy, efficiency, and comprehensive coverage.

Context you provide

  • {{app_name}}: The name of the application or system under test.
  • {{feature}}: The specific feature or functionality to be tested.
  • {{test_framework}}: The testing framework and language you prefer (e.g., Selenium with Python, Cypress with JavaScript).
  • {{existing_scripts}}: Any existing test scripts or test results you want reviewed.

Instructions

  1. If any required context is missing, ask for it before proceeding.
  2. Create automated test scripts for the specified feature, following best practices for the given framework.
  3. If existing scripts are provided, review them for potential bugs, inefficiencies, and coverage gaps.
  4. Suggest improvements to increase accuracy and efficiency.
  5. If comparing manual vs. automated testing, analyze time and resource savings based on provided data.

Output format Provide the test scripts in code blocks with comments explaining key steps. Include a brief summary of what the script covers and any recommendations for improvement. Use clear headings for each section.

Guardrails

  • Do not assume the testing framework; ask if not provided.
  • Flag any assumptions about the application's behavior or environment.
  • Stay within the scope of test automation; do not provide general QA advice.

Example {{app_name}}: 'E-commerce site' {{feature}}: 'User login' {{test_framework}}: 'Selenium with Python' {{existing_scripts}}: 'None'

Follow-up prompts

  • How can I integrate these test scripts into a CI/CD pipeline?
  • What are the best practices for handling dynamic elements in Selenium?
  • Can you help me write test scripts for edge cases like invalid credentials?