Install
openclaw skills install functional-test-case-standardGenerate and evaluate functional test cases following standardized quality dimensions. Use when creating test cases, reviewing test case documents, analyzing test case quality, scoring test cases, or when the user mentions test case templates, test case evaluation, test case standards, or test case quality assessment. Supports Markdown and XMind mindmap output formats with version management.
openclaw skills install functional-test-case-standardThis skill provides standardized guidelines for writing high-quality functional test cases and an 8-dimension evaluation framework for assessing test case quality.
Core Features:
Before designing test cases, perform deep requirement analysis using these 5 methods to extract all test details:
Analyze each sentence in the requirement document to identify:
Output: Each identified element becomes a verification item.
Example:
Identify the complete business flow from start to end:
Output: Each node and branch becomes a test scenario.
Example (Order Flow):
Trace data through its complete lifecycle:
Output: Each data transformation point becomes a verification item.
Example (User Registration):
Model the system as a finite state machine:
Output: Each valid and invalid transition becomes a test case.
Example (Order Status):
Analyze from different user perspectives:
Output: Each role-scenario combination becomes a test case.
Example (File Upload):
This skill supports two output formats with user-selectable options:
| Format | Trigger | Description |
|---|---|---|
| Markdown (default) | User does not specify format | Generate standard Markdown test case document |
| XMind Mindmap | User explicitly requests "mindmap format", "XMind format", or "both md and xmind" | Additionally generate XMind mindmap file for visual review |
| Dimension | Use Case | Structure | When to Use |
|---|---|---|---|
| Review Dimension (default) | Quality evaluation, peer review, requirement coverage analysis | Organized by: Module → Feature → Test Point → Verification Items (focus on completeness and coverage) | When stakeholders need to review test case coverage, during requirement review meetings, for quality audits |
| Execution Dimension | Test execution, automation, step-by-step testing | Organized by: Module → Test Case → Steps → Expected Results (focus on executability and traceability) | When testers execute test cases, for automation script generation, during test execution phase |
Ask user before generation:
Default behavior: If user does not specify, generate Markdown format with Review dimension.
Review Dimension Structure:
Product Requirement Name
├── I. Module Name
│ ├── 1.1 Sub-feature Name
│ │ ├── 1.1.1 Function Point
│ │ │ ├── Test Point: Condition Verification
│ │ │ │ ├── [ ] Verification Item 1
│ │ │ │ ├── [ ] Verification Item 2
│ │ │ │ └── [ ] Verification Item 3
│ │ │ └── Test Point: Business Rule Verification
│ │ │ ├── [ ] Verification Item 1
│ │ │ └── [ ] Verification Item 2
Execution Dimension Structure:
Product Requirement Name
├── I. Module Name
│ ├── 1.1 Sub-feature Name
│ │ ├── TC-001: [Module][Platform] Feature - Condition - Validation
│ │ │ ├── Precondition: ...
│ │ │ ├── Steps
│ │ │ │ ├── 1. ...
│ │ │ │ ├── 2. ...
│ │ │ │ └── 3. ...
│ │ │ ├── Expected Result
│ │ │ │ ├── 1. ...
│ │ │ │ ├── 2. ...
│ │ │ │ └── 3. ...
│ │ │ └── Priority: P0/P1/P2
Every test case generation creates a versioned file to enable traceability and historical comparison.
File Naming Convention:
{requirement-name}-v{MMdd_HHmmss}.md
{requirement-name}-v{MMdd_HHmmss}.xmind
Timestamp Format:
MMdd_HHmmss (MonthDay_HourMinuteSecond)0318_143052 means March 18, 14:30:52Example:
user-registration-enhancement-v0318_143052.mduser-registration-enhancement-v0318_143052.xmind (if XMind requested)Version Management Benefits:
Version Comparison: When user requests comparison between versions:
Design test cases by functional item. Group related functional points by business or operation type into "functional items" — each item contains one or more similar functional points. For a given functional item, input a specific set of data or operation sequence, and verify the unique output result for each functional point within that item.
Understand test layering to avoid over-reliance on a single test type. The pyramid guides resource allocation and test design focus for functional testing.
/\
/ \ E2E Tests (fewer, slower, high maintenance)
/----\ ————————————————————————————————————————
/ \ API / Integration Tests (moderate count, faster)
/--------\ ————————————————————————————————————————
/ \ Unit / Component Tests (most, fastest, cheapest)
/------------\
| Layer | Scope | Speed | Maintenance | When to Design Cases Here |
|---|---|---|---|---|
| Unit | Single function/class | <100ms | Low | Complex business logic, calculation rules, state machines |
| Integration | Module interactions | <1s | Medium | Database operations, message queues, third-party service calls |
| API | Interface contracts | <1s | Medium | Parameter validation, response structure, error codes, auth |
| E2E | Full user workflow | Seconds~minutes | High | Cross-module business flows, user-facing critical paths |
Guidelines:
Default adoption: Level 2 granularity.
| Level | Definition | Characteristics | When to Use |
|---|---|---|---|
| Level 1 | Validates a single, independent, indivisible functional point. The smallest functional verification unit with clear input and expected output. | Finest granularity; each case tests one boundary or rule. | When boundary values and independent rules need precise isolation. |
| Level 2 (Default) | Groups and merges multiple Level-1 points of the same type or related functional points into a small category. | Integrates similar points for systematic organization; easier management and maintenance. | Default choice for functional test cases. Balances coverage and maintainability. |
| Level 3 | Further integrates Level-2 cases of the same type or business relation into a large category. | Broader business scenario focus; higher-level test perspective; lower maintenance cost. | When a high-level overview of module coverage is needed. |
Requirement: Username restriction: length 6-20, lowercase English letters and digits only.
Level 2 case:
For detailed granularity examples, see reference.md.
Unified format: [Module][Platform] Feature - Condition - Validation Point
Naming principles:
Examples:
[Feedback][APP] Feedback Creation - Content - Length Validation[Promotion][WEB] Red Packet Campaign - Manual Stop - Impact Validation[OOH Management][WEB] OOH File Import - Template - Sales Region3 Required FieldFormat: primary_module_secondary_module_sequence_number
user_reg_001, order_create_014, product_import_005| Field | Required | Description |
|---|---|---|
| Case Name | Yes | Follow naming convention; concise input-condition-based description |
| Case ID | Yes | primary_module_secondary_module_sequence_number |
| Precondition | No | Prerequisites, specific inputs, and materials needed for the test |
| Test Steps | Yes | Clear, executable operation steps with specific UI elements |
| Expected Result | Yes | Unique, clear output result for the functional item, including state changes |
| Case Type | Yes | Functional / Smoke / Main-Flow / Single-API / API-Flow |
| Priority | Yes | P0(blocking/high) / P1(core/medium) / P2(normal/low) |
| Project | Yes | The project this case belongs to |
| Version | Yes | The version this case belongs to |
| Module | Yes | The module this case belongs to |
| Postcondition | No | Impact scope; fill when requirements change |
| Type | Description |
|---|---|
| Functional Test Case | Precisely designed for specific functional points with clear input and output. Example: verify username length limits, covering max, min, and empty boundary cases. |
| Smoke Test Case | Selected P0 cases from the test suite. Quickly validates whether critical main functions are available to determine if deeper testing can proceed. |
| Main-Flow Business Case | Designed according to business processes, covering the full lifecycle from start to end. Example: User A creates an order -> B processes it -> C approves -> D completes payment. |
| Single-API Case | Validates interface input parameters: required fields, empty values, wrong types, length overflow, etc. |
| API Business Flow Case | Uses interface operations to flow through the entire business process from start to end, validating business process integrity. |
Design methods are categorized into 5 groups. Select methods based on the functional item's characteristics.
Best for: Form fields, numeric ranges, length limits, date ranges, enum values.
Best for: Multi-field forms, configuration combinations, filter combinations, permission matrices.
Best for: Approval workflows, order lifecycles, stateful entities, multi-step operations.
Best for: Complex legacy systems, areas with high historical defect density, regression testing of fixed defects.
Best for: Regression test case design, complex stateful system test design.
| Functional Item Characteristic | Recommended Methods |
|---|---|
| Input forms with multiple fields | Equivalence class + Boundary value + Decision table |
| Business workflows with approvals | Scenario + State transition + Error guessing |
| Configuration / permission matrix | Pairwise + Decision table |
| API parameter validation | Boundary value + Equivalence class + Error guessing |
| Complex calculation logic | Equivalence class + Boundary value + Property testing |
| Unknown / new features | Risk-based testing + Error guessing |
1. 2. 3.Separate test logic from test data. Store data in external files (CSV, Excel, JSON, DB). The same test case executes with multiple data sets.
When to use: Login with multiple account types, form submission with various valid/invalid inputs, bulk import with different file formats.
Template:
| Data Set | Input | Expected Result |
|----------|-------|-----------------|
| Valid-1 | "user01" | Success |
| Valid-2 | "user123456" | Success |
| Invalid-1| "" | Error: username required |
| Invalid-2| "ab" | Error: min length 6 |
For cases that differ only in input values, design one case with parameters:
{username}, {password}, {amount}When dependencies are unavailable or unstable during test design:
Create -> Review -> Maintain -> Archive
| Stage | Key Activities | Decision Criteria |
|---|---|---|
| Create | Write case following standard; self-review before submission | Completeness of fields, design rationale clear |
| Review | Peer review or group review; focus on coverage gaps and design clarity | Coverage ≥ 90% of requirements; no empty fields; steps clear and specific |
| Maintain | Update case when requirements change; add cases for new defects | Review within 1 sprint of requirement change |
| Archive | Archive obsolete cases; do not delete (for audit trace) | Case no longer applicable for 2+ versions |
Use consistent terminology across the team:
| Preferred | Alternatives to Avoid |
|---|---|
| Create | Add, New, Insert |
| Query | Filter, Search |
| Edit | Modify, Update |
| Delete | Remove, Clear |
| Submit | Save, Confirm |
| Import | Upload (file scenarios only) |
| Export | Download (file scenarios only) |
Evaluate each test case author across these 8 dimensions (0-10 scale):
Composite Score = round(average of 8 dimensions, 1)
Grade Mapping:
When generating test cases from requirements:
Ask User Preferences:
Perform Requirement Analysis:
Design Test Cases:
Generate Output Files:
{name}-v{MMdd_HHmmss}.md{name}-v{MMdd_HHmmss}.xmindSelf-Review:
When evaluating test cases:
| Field | Value |
|-------|-------|
| Case ID | order_create_014 |
| Case Name | [Order Management][WEB] Order Creation - Product Quantity - Boundary Validation |
| Project | E-Commerce Platform |
| Version | V2.3.0 |
| Module | Order Processing |
| Case Type | Functional Test Case |
| Priority | P1 |
| Precondition | 1. User logged in with valid credentials<br>2. Products available in inventory |
| Test Steps | 1. Navigate to Order Management > Create Order<br>2. Select product and enter quantity as 0<br>3. Click Submit button<br>4. Enter quantity as 999<br>5. Click Submit button |
| Expected Result | 1. Order creation page loads successfully<br>2. Display error: "Quantity must be at least 1"<br>3. Display error: "Maximum order quantity is 100" |
| Postcondition | None |
Before submitting test cases, verify:
Reviewers use this checklist to verify case quality:
Review Item Pass Fail Notes
─────────────────────────────────────────────────────────
Naming follows standard format □ □
ID is unique and reflects module hierarchy □ □
Preconditions adequately described □ □
Steps executable (specific to UI elements) □ □
Expected results verifiable (specific) □ □
Priority reasonably assigned □ □
Granularity appropriate (Level 2 default) □ □
Positive/negative coverage balanced □ □
Test data specific □ □
Design method identifiable □ □
Traceable to requirements □ □
─────────────────────────────────────────────────────────
Review Conclusion: Pass / Needs Revision / Fail
Reviewer: __________ Date: __________