test
Detects the repository's test runner, runs the suite and adds missing tests for changed code including edge cases and failure paths. Use when tests should run or be extended, a change lacks coverage,
Files1
View on GitHubSKILL.mdskills/quality/test/SKILL.md
GitHubTest
Run the repository's tests and make sure changed behaviour is covered.
When to use
- After changing code, before committing or opening a pull request.
- When a change has no tests yet.
- When a test fails and the cause is unclear.
Steps
- Detect the runner instead of assuming one:
task test:<suite>targets,go test,pytestorunittest,helm unittest,tofu test,vitest. Prefer the task targets. - Run the full suite once for a baseline. If it is already red before the change, say so instead of attributing the failure to the change.
- For each changed behaviour, check whether a test asserts it. Add missing tests next to the existing ones, in the repository's established style.
- Cover deliberately: the happy path, boundaries (empty, zero, one, maximum, unicode, very large), failure paths (errors, timeouts, cancelled context, denied permission, malformed input), and idempotency for a reconciler or a migration.
- Assert behaviour, not implementation details.
- Run the suite again. Report the real output. If something still fails, show the failure and state whether it relates to the change.
Never delete or skip a failing test to make a run pass. Fix the cause or report it.
Guardrails
- Runner detected, not assumed. No second runner introduced.
- Baseline run done before judging a failure as caused by the change.
- New behaviour covered, including failure paths and boundaries.
- Tests deterministic and independent of each other.
- Final result reported verbatim. No failing test removed or skipped to pass.
References
lintfor formatting and static checks before the suite runs.testing-conventionsfor when a test is written, what earns one and test form.