Tester Agent

Automated test execution with 80%+ coverage targets, failure diagnosis, and build verification across all major frameworks.

Cognitive Framing

This agent operates as a QA Lead performing systematic verification — hunting untested code paths, coverage gaps, and edge cases that slip through normal development cycles.

Behavioral Checklist

Before completing any task, this agent verifies:

  • All changed files have corresponding test coverage
  • Coverage gaps on critical code paths identified and flagged
  • Edge cases for boundary conditions covered
  • Error scenarios and exception paths tested
  • Flaky tests detected and isolated
  • Build verification passes (typecheck, lint, compile)
  • Coverage targets met (80%+ overall)

Diff-Aware Mode

By default, the tester agent analyzes the git diff and runs only the tests affected by recent changes. Five mapping strategies determine which tests to run:

StrategyTrigger
Co-locatedTest file sits next to source file (foo.tsfoo.test.ts)
Mirror directoryTests mirror source structure (src/api/tests/api/)
Import graphFile is imported by a tested module (transitive impact)
Config detectionConfig/infra files changed (tsconfig, jest.config, package.json) → full suite
High fan-outFile imported by many modules — runs broader suite

Auto-escalation to full suite occurs when:

  • More than 70% of total tests are mapped by the diff (overhead not worth it)
  • Configuration files are modified (package.json, tsconfig.json, CI workflows, etc.) — config changes always trigger full suite

This keeps CI fast on small PRs while ensuring correctness on large changes.

When to Use

  • /ck:test - Run full test suite with coverage
  • /ck:fix [issue] - Fix failing tests automatically
  • Pre-commit/pre-push validation
  • CI/CD pipeline verification

Key Capabilities

CategoryToolsCoverage Target
Unit TestsJest, Vitest, pytest, cargo test, go test80%+
IntegrationAPI testing, DB interactions, service layersCritical paths
E2EPlaywright, Cypress, Flutter integration testsCritical paths
CoverageLine, branch, function, statement analysis80%+ overall
Build CheckTypeScript, linting, bundle size, compilation100% pass

Common Use Cases

Solo Dev - Pre-commit validation

/ck:test

Validates all changes before commit with coverage report

QA Engineer - Bug regression prevention

/ck:test
Then review: Which areas have <80% coverage?

Team Lead - PR validation

/ck:test
Verify: All tests pass + coverage targets met

DevOps - CI/CD integration

/ck:test
Output: JSON report for pipeline integration

Full-Stack Dev - Multi-framework testing

/ck:test

Runs: Flutter analyze + Jest + pytest in sequence

Pro Tips

Coverage-first approach: Always check coverage gaps after test runs - uncovered code = untested risk Fail fast: Use /ck:test before starting new work to catch environment issues early Fix atomically: Use /ck:fix [specific failure] for targeted repairs instead of batch fixes Performance baseline: Track test execution time - >60s indicates need for optimization Docker isolation: Run tests in containers for consistency across team environments

Key Takeaway

Test execution isn’t about 100% coverage - it’s about 80%+ on critical paths with zero flaky tests. The tester agent finds failures, diagnoses root causes, and ensures your coverage targets before any commit goes through.