Guides
Improve test coverage overnight with Codex or Claude Code
Write meaningful tests around risk and behavior until quitting time, using coverage as a tripwire rather than a target.
Answers: use Codex or Claude Code to increase test coverage · Updated
A coverage hunt follows untested behavior and risk, not a vanity percentage. Add tests that can fail for the right reason, keep exclusions explicit, and let the deadline bound the open-ended work.
Choose useful targets
Prioritize important behavior, error paths, recovery, contracts, and recently changed code. A covered line is valuable only when the assertion protects an outcome.
- Start from failures and boundaries.
- Prefer behavior over implementation detail.
- Avoid assertions that merely repeat the code.
- Explain every exclusion.
Keep the suite trustworthy
Run the focused test during development and the declared gate before commit. Do not silence flakes or weaken assertions just to move the number.
- Use deterministic fixtures.
- Test both success and failure paths.
- Keep runtime proportional to the protection gained.
Stop at the deadline
Coverage work has no natural final percentage. Finish the current coherent test unit, record what remains, and stop when the clock expires.
Start with a bounded prompt
This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.
Run a four-hour coverage hunt. Find high-value untested behavior, write behavior-protecting tests, run the item gate, and commit each coherent test improvement separately.What this workflow does not claim
- Coverage is a discovery signal, not the completion target; padding tests is forbidden.
- Open-ended coverage work requires hours and a deadline.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.