# Create a test plan and test cases

A risk-based test strategy with test cases for functional, integration, and end-to-end testing.

- Topic: Software Development
- Framework: RCTFVV
- Level: Advanced
- Tags: Analyze, Plan, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/create-a-test-plan-and-test-cases

## Prompt

```text
Role: Act as a QA engineer designing tests for a new or changed feature.

Context: Feature and acceptance criteria: [FEATURE]. Architecture and integration points: [ARCHITECTURE]. Test framework and existing patterns: [TEST_FRAMEWORK]. Risk areas and past incidents in this area: [RISK_AREAS]. Data and environment available: [DATA_ENV]. Out-of-scope: [OUT_OF_SCOPE].

Task: Produce: (1) a test plan - scope, the risk assessment, the coverage matrix (scenario x test level: unit / integration / e2e), and entry/exit criteria; (2) detailed test cases for the highest-risk scenarios including boundary, negative, and failure-injection cases; (3) the automated tests for the unit and integration cases, in the project's framework and style.

Format: Sections: Test plan | Coverage matrix (table) | Test cases | Automated tests (code).

Verification: Map every acceptance criterion and known risk area to at least one case; flag scenarios that cannot be automated with the available data/environment.

Validation: Review coverage against the past incidents in this area: would these tests have caught them? Add cases for any that would have slipped through.
```

## What to fill in

- FEATURE
- ARCHITECTURE
- TEST_FRAMEWORK
- RISK_AREAS
- DATA_ENV
- OUT_OF_SCOPE

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
