Skip to main content

Stage 6 — Unit Tests

Agents: bmad-tea, bmad-testarch-test-design · Approver: Test Lead

Generate comprehensive tests matched to the language & framework chosen in intake.

  1. Invoke Test Agent: System calls Skill: bmad-tea → Skill: bmad-testarch-test-design + bmad-testarch-framework
  2. Framework Selection matches language: Jest (React/Node), JUnit 5 + Mockito (Java/Spring Boot), pytest (Python), Vitest (Vite projects)
  3. Coverage Targets — see the table below
  4. Test Types Generated: Unit tests, integration tests, contract tests, edge case tests, negative path tests
  5. Tests Enforcer Audit: agent-s6-tests-enforcer validates coverage reports
  6. Test Lead Approval → Stage 7 unlocks

Coverage targets​

LayerCoverage Target
Service Layer90% line + branch
API / Controller Layer85%
Data / Repository Layer80%

Artifacts: docs/sdlc/{ProjectName}_06-unit-tests.md · .docx, tests/unit/ (all test files)