TEST-004 critical test-requirements

End-to-end tests for business-critical paths

E2e test framework configured with tests covering revenue, auth, and core user journeys

Question to ask

"If checkout broke right now, how fast would you know?"

Verification guide

Severity: Critical

Check automatically:

  1. Detect e2e test framework:

    # Look for e2e configs
    ls -la playwright.config.* cypress.config.* cypress.json 2>/dev/null
    
    # Check for e2e folders
    ls -d e2e/ cypress/ tests/e2e/ 2>/dev/null
    
    # Check package.json for e2e scripts
    grep -E '"e2e":|"test:e2e":|playwright|cypress' package.json
    
  2. Search for documented critical paths:

    # Check for critical path documentation
    grep -riE "critical path|business.?critical|core.?journey|revenue|checkout|payment flow" \
      README.md docs/ CLAUDE.md PRD.md e2e/ cypress/ 2>/dev/null
    
    # Check e2e test file names for clues
    find . -path ./node_modules -prune -o -type f \( -name "*.e2e.*" -o -path "*/e2e/*" -o -path "*/cypress/*" \) -print 2>/dev/null
    
  3. List e2e test files:

    find . -path ./node_modules -prune -o -type f \( -name "*.e2e.*" -o -name "*.spec.*" -o -path "*/e2e/*" -o -path "*/cypress/*" \) -print 2>/dev/null
    
  4. Run e2e tests (if configured):

    pnpm test:e2e
    

Cross-reference with:

  • TEST-001 - e2e coverage may be tracked separately from unit test coverage
  • Section 14 (Documentation) - critical paths should be documented

Pass criteria:

  • E2e test framework configured
  • E2e tests exist for critical paths (revenue, auth, core user journeys)
  • E2e tests run and pass

Fail criteria:

  • No e2e framework configured
  • E2e tests exist but don't cover critical paths
  • E2e tests are broken/skipped

If critical paths not documented, ask user: "What are the business-critical paths for this project? (e.g., checkout flow, signup, payment). I'll verify e2e tests exist for each."

Evidence to capture:

  • E2e framework detected
  • Number of e2e test files
  • Documented critical paths (if found)
  • List of critical paths covered by e2e tests
  • List of critical paths missing e2e tests
  • E2e test pass/fail results

Section

08. Testing & Code Metrics

Monitoring & Health