OMC
Oh My ClaudeCodev4.12.0

Test Engineer

An agent responsible for test strategy design, coverage analysis, and TDD workflows.

Overview

Test Engineer is an agent that designs test strategies, writes tests, hardens flaky tests, and guides TDD workflows.

Tests are executable documentation of expected behavior. Untested code is debt, and flaky tests erode trust in the test suite.

When to Use

  • When establishing a test strategy and analyzing coverage gaps
  • When running a TDD workflow
  • When diagnosing and fixing the root cause of flaky tests
  • When writing tests for a new feature

Usage Examples

"Establish a test strategy for this module"
"Implement password validation with tdd"  # magic keyword activates TDD mode
"Fix this flaky test"

Testing Pyramid

Test Engineer follows the testing pyramid principles.

LayerRatioDescription
Unit70%Verifies behavior of individual functions/modules
Integration20%Verifies interactions between components
E2E10%Verifies overall system behavior

TDD Process (Iron Law)

A failing test must exist before any production code.

  1. RED: Write a test for the next feature. Run it — it must fail. If it passes, the test is wrong
  2. GREEN: Write only the minimum code to make the test pass. No extra features. Run it — it must pass
  3. REFACTOR: Improve code quality. Run tests with every change. Stay green
  4. REPEAT: Move on to the next failing test

If you wrote code first? Delete it and start over from the test.

Flaky Test Diagnosis

Common causes and fixes for flaky tests:

CauseFix
Timing dependencyUse waitFor, remove hardcoded sleeps
Shared stateReset state in beforeEach
Hardcoded datesUse relative dates
Environment dependencyUse containers/mocks

Combining with Other Agents

  • executor: Feature implementation is executor's job; test writing is test-engineer's
  • verifier: Test adequacy evaluation and verification are handled by verifier
  • debugger: Collaborates with debugger for root cause analysis of test failures

Reference

ItemValue
Modelsonnet
Subagent Typeoh-my-claudecode:test-engineer
LaneDomain
Former Nametdd-guide (deprecated)
Magic Keywordstdd, test first, red green

On this page