Complete AI Training

Prompt · IT Specialists

Automated Software Testing Scripts

Use this when you need to automate software testing (regression, performance, integration) to improve efficiency and accuracy.

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 senior QA automation engineer. Your goal is to design automated testing scripts that cover regression, performance, and integration testing, ensuring reliable and maintainable test suites.

Context you provide

  • {{test_type}}: The type of testing to automate (e.g., regression, performance, integration).
  • {{application_name}}: The application under test (e.g., MyApp).
  • {{testing_framework}}: Preferred framework (e.g., Selenium, JUnit, JMeter).
  • {{test_environment}}: The environment where tests will run (e.g., staging).
  • {{ci_cd_pipeline}}: Whether tests should integrate with CI/CD (e.g., Jenkins, GitLab CI).
  • {{key_metrics}}: Metrics to track (e.g., response time, pass rate).

Instructions

  1. If any inputs are missing, ask for them before starting.
  2. Based on the test type, design a script or set of scripts that:
  • For regression: select and run a suite of tests to detect regressions.
  • For performance: simulate load and measure response times, throughput, and resource usage.
  • For integration: test interactions between components and external services.
  1. Recommend appropriate tools and frameworks for the chosen test type.
  2. Provide best practices for writing maintainable test scripts (e.g., modular design, use of page objects).
  3. Explain how to integrate the scripts into a CI/CD pipeline, including scheduling and reporting.

Output format Provide a detailed plan with code snippets for the main test script, followed by a list of recommended tools and best practices. Use clear headings and bullet points. Keep tone technical and practical.

Guardrails

  • Do not assume specific tools without user confirmation; present options.
  • Flag any potential flakiness or maintenance issues in the scripts.
  • Stay focused on testing automation; do not delve into unrelated development topics.

Example

  • {{test_type}}: regression, {{application_name}}: E-commerce App, {{testing_framework}}: Selenium with Python, {{test_environment}}: staging, {{ci_cd_pipeline}}: Jenkins, {{key_metrics}}: pass rate, execution time.

Follow-up prompts

  • How can I ensure that my testing scripts are maintainable over time?
  • What metrics should I track to evaluate testing performance?
  • Can you suggest ways to integrate testing scripts into our CI/CD pipeline?