Skip to main content

QA Lead Agent (Deprecated)

note

The qa-lead skill has been removed from the core plugin. Use testing:qa instead, which provides the same QA strategy and test coverage capabilities.

The QA Engineer Agent (testing:qa) is SpecWeave's AI-powered Quality Assurance specialist that handles test strategy, test case generation, and coverage validation.

What It Doesโ€‹

Key responsibilities:

  • ๐Ÿงช Test strategy - Defines testing approach and coverage targets
  • ๐Ÿ“ Test case generation - Creates comprehensive test cases
  • ๐Ÿ“Š Coverage validation - Ensures coverage targets are met
  • โœ… Quality gates - Validates work meets quality standards
  • ๐Ÿ” Edge case identification - Finds boundary conditions

Test Generationโ€‹

The QA Lead Agent creates tests in BDD format:

## Test Cases for AuthService

### TC-001: Valid Login
**Given** a registered user with valid credentials
**When** they submit the login form
**Then** they receive a JWT token and are redirected to dashboard

### TC-002: Invalid Password
**Given** a registered user with invalid password
**When** they submit the login form
**Then** they see an error message "Invalid credentials"

### TC-003: Rate Limiting
**Given** a user who has failed login 5 times
**When** they try to login again
**Then** they see "Too many attempts, try again in 1 minute"

Coverage Targetsโ€‹

Default coverage targets by test type:

Test TypeTargetPurpose
Unit Tests90%Business logic
Integration Tests85%Component interaction
E2E Tests100% critical pathsUser flows

Commandsโ€‹

Check Test Coverageโ€‹

npx vitest run 0001

Output:

๐Ÿ“Š Test Coverage Report: 0001-user-authentication

Per-Task Coverage:
T-001: AuthService โœ… 95% (target: 90%)
T-002: JWTManager โœ… 92% (target: 90%)
T-003: PasswordHasher โš ๏ธ 85% (target: 90%)

AC-ID Coverage:
AC-US1-01 โœ… Covered (auth.test.ts:42)
AC-US1-02 โœ… Covered (auth.test.ts:78)
AC-US1-03 โš ๏ธ Missing tests

Overall: 89% (target: 88%) โœ…

Recommendations:
- Add tests for AC-US1-03 (remember me checkbox)
- Increase PasswordHasher coverage (+5%)

Validate Qualityโ€‹

"Quality check on increment 0001"

Test Pyramid Enforcementโ€‹

The QA Lead Agent enforces the test pyramid:

        /\
/ \ E2E Tests (few, slow, expensive)
/----\
/ \ Integration Tests (some)
/--------\
/ \ Unit Tests (many, fast, cheap)
--------------

Guidance:

  • Write many fast unit tests
  • Write some integration tests
  • Write few E2E tests (critical paths only)

Integration with Workflowโ€‹

  • TDD - Test-driven development
  • BDD - Behavior-driven development
  • E2E - End-to-end testing
  • Test Coverage - Coverage metrics
  • Test Pyramid - Testing strategy
  • Quality Gate - Validation checkpoints