Use Pest, PHPUnit, Jest, Mocha, Vitest, Cargo, or your existing runner exactly as before. Parity only needs a supported coverage file or an attribution converter.
Drop-in CLI for coverage ownership checks
Variation 02 / Developer
Add a file-owned coverage gate in one config file.
Install Parity, point it at your existing coverage artifact, and ask the only local question that matters: did the belonging test meaningfully cover this file?
quickstartcomposer require --dev testparity/parity
php vendor/bin/parity init
XDEBUG_MODE=coverage ./vendor/bin/pest \
--coverage-xml=coverage-xml \
--coverage-clover=clover.xml
php vendor/bin/parity check --format=jsonminimumstructure:
- name: Services
paths:
source: app/Services
test: tests/Unit/Services
rules:
- test-exists
- matched-coverage:
min: 70Designed not to replace your runner.
Parity runs after Pest, PHPUnit, Jest, Mocha, Vitest, Cargo, or another runner has produced coverage. It reads Parity JSON, PHPUnit XML, Clover XML, or Cobertura XML and checks structure, ownership, and matched coverage when attribution is available.
- Deterministic exit codes for CI
- JSON for automation
- Table output for local review
Declare where application files live, where belonging tests live, and which rule minimums should block a merge.
The output points to the exact source/test pair instead of asking the author to interpret a global percentage.
Output designed for scripts and humans.
Local runs can use table output. CI can ingest JSON and annotate the pull request with file-level accountability.
passedfor release statesourceandtestfor the exact pairrulesfor policy-specific values
failure{
"source": "app/Services/CheckoutGateway.php",
"test": "tests/Unit/Services/CheckoutGatewayTest.php",
"rules": {
"matched-coverage": {
"value": "18%",
"min": "70%",
"passed": false
}
}
}php vendor/bin/parity listPreview source/test pairs before enforcing.php vendor/bin/parity checkRun the release gate locally or in CI.php vendor/bin/parity check --format=jsonEmit machine-readable failures.
