# Test Engineering

> Designs, implements, repairs, or reviews deterministic automated tests that protect meaningful behavior without chasing superficial coverage. Use when confidence is insufficient and stronger regression or validation evidence is needed.

- Skill: `egohygiene/test-engineering` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add egohygiene/test-engineering`
- Raw SKILL.md: https://api.skillmd.com/api/skills/egohygiene/test-engineering/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: egohygiene (https://skillmd.com/u/egohygiene)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/egohygiene/test-engineering

---


# Test Engineering

<!-- aether-continuity-disposition: reader-writer -->

## Repository continuity composition

For repository-scoped work, compose `maintain-repository-continuity` in
**Resume** mode before selecting work. After an authorized repository change
passes domain validation, compose **Refresh** and **Verify** immediately before
presenting the pull request, and include the reconciled root `CONTINUITY.md` in
the same change. A policy-permitted no-change or exemption result must be
documented instead of fabricating an edit.

- **Contribute:** Behavior under test, deterministic coverage, exact commands and outcomes, remaining gaps, and residual risk
- **Never claim:** That tests prove behavior, environments, or integrations they did not exercise

## Purpose

Increase confidence with deterministic tests that cover meaningful behavior,
risk, and boundaries without weakening assertions or overfitting to
implementation trivia.

## Required Inputs

Resolve as much of the following as possible:

- behavior or contract at risk
- failure impact and the boundary under test
- existing coverage and why it is insufficient
- repository test conventions, infrastructure, and validation commands
- sources of nondeterminism such as time, randomness, network, or environment

## Workflow

1. model the risk and choose the lowest sufficient test layer
2. design deterministic fixtures, seams, and assertions using:

    - `./references/determinism-checklist.md`
    - `./templates/TEST_PLAN.template.md`

3. assert observable behavior and meaningful state transitions
4. add success, failure, boundary, and recovery coverage proportional to risk
5. write a regression test when addressing a defect
6. validate with the smallest focused command first, then broader required checks
7. report covered behavior, remaining risk, and any required follow-up testability work

## Constraints

- Do not chase coverage percentages by weakening assertions.
- Do not paper over flakiness with sleeps, retries, or disabled tests.
- Do not test implementation trivia when observable behavior suffices.
- Do not duplicate the same assertion across many layers without added value.
- Do not update expected output blindly after a failing test.

## Completion Criteria

- [ ] The chosen test layer is justified by risk and cost.
- [ ] Tests are deterministic and assert meaningful behavior.
- [ ] Important success, failure, or boundary paths are covered proportionally.
- [ ] Validation commands and outcomes are explicit.
- [ ] Remaining risk and follow-up seams are visible.

## Provenance

This canonical skill is first-party Ego Hygiene content curated from the staged
candidate at `.staging/skills/test-engineering/SKILL.md`.

## Source Delta

- Adopted: the staged focus on risk modeling, layer selection, deterministic
  design, and anti-flakiness constraints.
- Rewritten: canonical metadata, deterministic-testing resources, and explicit
  update/regression eval coverage.
- Rejected: the narrower `breakdown-test` and `pytest-coverage` overlaps as
  canonical identities because the core workflow must stay general-purpose and
  behavior-focused rather than framework- or coverage-metric-centric.

