AI Skill Report Card

Generating Test Cases from PRD

B+78·Mar 14, 2026·Source: Web
YAML
--- name: generating-test-cases-from-prd description: Generates comprehensive test cases from PRD (Product Requirements Document) following industry standards. Use when you have a PRD and need structured test scenarios for QA validation. ---

Quick Start

Python
# Input: PRD section prd_section = """ Feature: User Login - Users can login with email/password - Password must be 8+ characters - Account locks after 3 failed attempts - Remember me option for 30 days """ # Generate test cases immediately test_cases = analyze_prd_and_generate_tests(prd_section)

Workflow

Progress:

  • Parse PRD requirements and identify testable features
  • Extract functional and non-functional requirements
  • Generate positive test scenarios
  • Generate negative test scenarios
  • Generate boundary/edge cases
  • Format according to standard test case template
  • Add priority levels and test data
  1. Requirement Analysis

    • Extract user stories and acceptance criteria
    • Identify input fields, validations, and business rules
    • Note system integrations and dependencies
  2. Test Case Generation

    • Create test case ID with naming convention
    • Write clear test objectives
    • Define preconditions and test data
    • Specify detailed test steps
    • Define expected results
  3. Coverage Validation

    • Ensure all requirements are covered
    • Add regression scenarios for existing features
    • Include accessibility and performance tests where applicable

Examples

Example 1: Input: "User registration: Email field required, must be valid format, password 8-20 chars with special character"

Output:

TC_REG_001 | Valid Registration
Priority: High
Precondition: User on registration page
Test Data: email="test@example.com", password="Test123!"
Steps:
1. Enter valid email in email field
2. Enter valid password in password field  
3. Click Register button
Expected: User registered successfully, redirected to dashboard

TC_REG_002 | Invalid Email Format
Priority: High
Precondition: User on registration page
Test Data: email="invalid-email", password="Test123!"
Steps:
1. Enter invalid email format
2. Enter valid password
3. Click Register button
Expected: Error message "Please enter valid email format"

TC_REG_003 | Password Too Short
Priority: Medium
Precondition: User on registration page
Test Data: email="test@example.com", password="Test1!"
Steps:
1. Enter valid email
2. Enter password with 6 characters
3. Click Register button
Expected: Error "Password must be 8-20 characters"

Example 2: Input: "Search feature: Users can search products by name, filter by category, sort by price"

Output:

TC_SEARCH_001 | Basic Product Search
Priority: High
Test Data: search_term="laptop"
Steps:
1. Enter "laptop" in search box
2. Click search button
Expected: Display products containing "laptop" in name

TC_SEARCH_002 | Search with Category Filter
Priority: High
Test Data: search_term="phone", category="Electronics"
Steps:
1. Enter "phone" in search box
2. Select "Electronics" category filter
3. Click search
Expected: Show phones from Electronics category only

TC_SEARCH_003 | Empty Search Results
Priority: Medium
Test Data: search_term="xyznoproduct123"
Steps:
1. Enter non-existent product name
2. Click search
Expected: "No products found" message displayed

Best Practices

  • Use standard test case format: ID, Title, Priority, Preconditions, Test Data, Steps, Expected Result
  • Follow naming conventions: TC_[FEATURE]_[NUMBER] format
  • Include both positive and negative scenarios for each requirement
  • Add boundary value testing for numeric inputs and limits
  • Specify exact test data rather than generic placeholders
  • Write atomic test cases - one test case per scenario
  • Include API/backend testing for system integrations mentioned in PRD
  • Add usability test cases for user experience requirements

Common Pitfalls

  • Don't create vague test steps - "Test login functionality" is too generic
  • Don't skip negative test scenarios - Always test invalid inputs and edge cases
  • Don't ignore non-functional requirements - Include performance, security, accessibility tests
  • Don't duplicate test scenarios - Each test case should have unique value
  • Don't forget cleanup steps for tests that create data
  • Don't omit preconditions - Clearly state system state before test execution
  • Don't use production data in test cases - Always specify test data sets
0
Grade B+AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
10/15
Workflow
13/15
Examples
18/20
Completeness
10/20
Format
15/15
Conciseness
12/15