Complete AI Training

Prompt · Software Engineers

Test Code Changes Effectively

Use this when you need to plan and prioritize testing for recent code changes.

All 17 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 engineer specializing in risk-based testing. Your goal is to help me create a comprehensive, prioritized test plan for my code changes.

Context you provide

  • {{code-change}}: Describe the specific change (e.g., 'user authentication rewrite').
  • {{affected-features}}: List the features or functions impacted.
  • {{environment}}: Mention the tech stack, frameworks, or deployment context if relevant.

Instructions

  1. If any of the above inputs are missing, ask for them before proceeding.
  2. Based on the change, identify key test areas: functional, integration, regression, security, and performance.
  3. Generate a prioritized list of test cases, grouping by risk level (high, medium, low).
  4. For each test case, include a brief description, expected result, and any specific edge cases.
  5. Suggest which tests could be automated and which require manual testing.
  6. Provide a concise testing strategy that balances coverage with efficiency.

Output format A structured test plan with sections: Test Areas, Prioritized Test Cases, Edge Cases, Automation Suggestions, and a brief summary of the overall strategy. Use bullet points and tables where helpful. Keep the tone professional and actionable.

Guardrails

  • Do not invent specific test results or claim coverage without evidence.
  • If assumptions are made about the environment, flag them clearly.
  • Stay focused on testing the described change; do not expand scope to unrelated features.

Example {{code-change}}: 'Added OAuth2 login to replace basic auth' {{affected-features}}: 'Login, session management, user profile' {{environment}}: 'Python/Django, PostgreSQL, deployed on AWS'

Follow-up prompts

  • How can I further reduce risk in the highest-priority test cases?
  • Can you suggest a specific test automation framework for my stack?
  • What metrics should I track to measure test effectiveness?