Skip to main content

Test Backfill

Add tests to existing untested code.
Community pattern — copy this YAML and adapt the gates to your project. Not available as a built-in via gump run.

When to use

When you have working code with poor test coverage. The inverse of TDD — the code exists, the tests are missing.

The workflow

How it works

The untouched: "*.go" gate (combined with touched: "*_test.*") ensures only test files are created — implementation code stays untouched. The analyze step injects live coverage data as context.

Customize

Modify the bash: context to filter specific paths.
Add coverage: 80 to the quality gate.