Tool 'didrun' Exposes Silent CI Failures When Exit Code 0 Masks Empty Test Runs
A developer tool called 'didrun' addresses a longstanding gap in test automation where exit code 0 is returned even when no tests actually ran, giving a false green signal. The tool introduces four distinct exit states — ran-and-passed, ran-and-failed, did-not-run, and ran-and-failed-wrongly — to separately answer whether a check ran, failed, or failed for the right reason. A concrete example shows that running 'go test ./...' on a directory with no test files exits 0 by default, but wrapped with didrun it exits 3, explicitly flagging that nothing was verified. Additional predicates like '--expect-count' and '--wrote PATH' guard against subtler false positives, such as a test suite printing '0 passed' or a stale output file left over from a previous run. The project argues that silently falling back to forwarding an exit code is itself the defect these tools are meant to catch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in