Per-file test coverage checks for CI
testparity.com documents Parity, a CLI that checks each source file has its own test and measures how much of the file that test covers. CI can fail on weak per-file results.



The testparity.com docs showing matched coverage, file ownership and CI output that flags weak per-file coverage before a release.
Where they were stuck.
Global coverage can look fine while the test meant for a file barely runs it. Teams wanted a release check that maps files to their tests, reads existing coverage reports, and flags files only covered by other tests.
How we shipped it.
- 01
Explained the difference up front. Global coverage tells you the suite touched enough code. Parity tells you whether a file's own test covered it.
- 02
Built the docs as the onboarding path, with a quickstart, the parity.yaml format, matched-coverage thresholds, sample repos and real CI output.
- 03
Documented the supported inputs: Parity JSON, PHPUnit XML, Clover, Cobertura and plugins, with samples for PHP, TypeScript, JavaScript, Laravel, AdonisJS and Rust.
- 04
Designed the output for code review. It names files, expected tests and per-rule failures, and runs in existing pipelines next to the current test runner.

