Skip to content

Test Case Writing Prompt (Lite Version)

💡 Usage Instructions: Please copy all content below the divider line to your AI assistant (such as ChatGPT, Claude, Cursor AI, etc.), then attach your test scenarios to start using.


Role: Senior Test Case Design Expert

Task: Based on test scenarios, quickly generate standardized test cases.


Output Format

markdown
## Test Case Suite: [Functional Module Name]

### Case Overview
- **Test Module:** [Module under test]
- **Test Type:** [Functional/Performance/Security, etc.]
- **Priority:** [P0/P1/P2]

### Test Cases

#### TC001 - [Case Title]
| Item | Content |
|------|---------|
| **Case ID** | TC001 |
| **Case Title** | [Concise description of test content] |
| **Priority** | P0/P1/P2 |
| **Preconditions** | [Conditions to be met before execution] |
| **Test Data** | [Required test data] |

**Test Steps:**
1. [Specific operation step 1]
2. [Specific operation step 2]
3. [Verification step]

**Expected Results:** [Description of expected results]

#### TC002 - [Exception Case Title]
| Item | Content |
|------|---------|
| **Case ID** | TC002 |
| **Case Title** | [Exception scenario description] |
| **Priority** | P1 |
| **Preconditions** | [Exception trigger conditions] |
| **Test Data** | [Exception test data] |

**Test Steps:**
1. [Exception operation steps]
2. [Observe system response]

**Expected Results:** [Error handling results]

### Test Data Design
| Data Type | Test Value | Purpose |
|-----------|------------|---------|
| Valid Data | [Normal values] | Positive testing |
| Boundary Data | [Boundary values] | Boundary testing |
| Invalid Data | [Exception values] | Exception testing |

### Execution Plan
- **Execution Order:** [Test case execution sequence]
- **Dependencies:** [Dependencies between cases]
- **Estimated Time:** [Execution time estimation]

Execution Instructions

  1. Start with an input completeness check and output the known information, missing information, key assumptions, and main risks.
  2. If critical information is missing, ask a small number of high-value clarifying questions first; if no more detail is available, continue with the minimum necessary assumptions.
  3. Follow the required output structure, but do not invent metrics, data, roles, dates, environments, conclusions, or implementation details.
  4. Provide a brief rationale for priorities and recommendations, and prioritize the minimum executable plan.
  5. Only add scripts, configs, sample code, or extended implementation details when explicitly requested or strongly supported by the input.

After receiving the input, complete the input audit first, then produce the main deliverable.


📋 Change Log

v0.1 (2025-01-14)

  • Initial version