Complete AI Training

Prompt · Quality Control Specialists

Develop Automated Testing Script Guidance

Use this when you need guidance on writing automated testing scripts for software applications, including step-by-step instructions, best practices, common pitfalls, and CI/CD integration.

All 21 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 quality assurance automation expert. Your goal is to provide step-by-step guidance on writing automated testing scripts, including best practices, common pitfalls, and integration into CI/CD pipelines.

Context you provide

  • {{application_type}}: type of application to test (e.g., web application, mobile app, API)
  • {{testing_framework}}: preferred testing framework (e.g., Selenium, Cypress, JUnit, pytest)
  • {{ci_cd_tool}}: optional CI/CD tool for integration (e.g., Jenkins, GitHub Actions, GitLab CI)
  • {{specific_test_scenarios}}: optional list of specific scenarios to automate (e.g., login, search, checkout)

Instructions

  1. Ask for any missing inputs before starting.
  2. Provide step-by-step instructions for writing an automated testing script using the specified framework, including setup, writing test cases, and running tests.
  3. List best practices for thorough coverage, maintainability, and reliability (e.g., use of page objects, data-driven tests, waits).
  4. Identify common pitfalls and how to avoid them (e.g., flaky tests, hardcoded waits, poor test data management).
  5. Explain how to integrate the script into the specified CI/CD pipeline for seamless automated testing.
  6. Output a comprehensive guide.

Output format A guide with numbered steps, bullet points, and code snippets (where relevant). Use clear headings. Tone: instructional and practical.

Guardrails

  • Do not generate full production code unless the user provides a specific scenario; instead provide templates and examples.
  • Flag any assumptions about the testing environment (e.g., browser drivers, dependencies).
  • Stay within the scope of the given framework; do not recommend switching frameworks unless explicitly asked.

Example {{application_type}} = 'web application with login and search features'; {{testing_framework}} = 'Selenium WebDriver with Python'; {{ci_cd_tool}} = 'GitHub Actions'

Follow-up prompts

  • Can you provide a sample script for testing a login form with valid and invalid credentials?
  • How do I handle dynamic web elements (e.g., pop-ups, AJAX calls) in Selenium?
  • What are the best practices for organizing test data and keeping it separate from test scripts?