Skip to content

S011: Parity Test Execution & Per-Test Coverage Reports

FieldValue
SpecS011
FeatureParity Test Execution & Per-Test Coverage Reports
Date2026-07-08
StatusImplemented
AuthorCodex

Overview

Parity has two coverage ingestion modes:

  • Read an existing coverage artifact with parity check.
  • Generate attribution-grade coverage artifacts with parity test.

This specification defines the public contract for parity test and for Parity's directory-based per-test coverage report format. The command exists because many test runners can emit aggregate coverage, but only some can emit line-level attribution showing which specific test covered which specific source line. parity test closes that gap by executing each expected test file individually, normalizing the resulting single-test coverage artifact, and producing a Parity-native per-test report set that parity check can consume deterministically.

The spec covers four concerns: configuration under the test: block in parity.yaml, CLI behavior of parity test, the on-disk JSON report directory format, and the default follow-up invocation of parity check. It is the normative source for the command contract (S011-FR), interface and schema requirements (S011-IF), acceptance scenarios (S011-AS), edge-case handling (S011-EC), and success criteria (S011-SC).

User Scenarios

S011-US-001 [P1] As a developer using a coverage format without per-test attribution, I want Parity to run each expected test file individually so that matched coverage can still be computed correctly.

S011-US-002 [P1] As a CI pipeline, I want a deterministic on-disk artifact format for one-report-per-test coverage so that parity check can consume it without custom adapters.

S011-US-003 [P1] As a maintainer, I want parity test to run parity check by default after generating reports so that the command is useful as a release gate by itself.

S011-US-004 [P2] As a developer, I want placeholder-based command and coverage paths so that I can integrate Parity with different runners and languages.

S011-US-005 [P2] As a contributor, I want the per-test report directory to be simple JSON so that fixtures, debugging, and CI artifacts remain inspectable without proprietary tooling.

S011-US-006 [P1] As a developer, I want failed or timed-out generation to preserve my last complete reports and never delete unrelated files when a path is misconfigured.

Requirements Summary

IDTypePriorityTitleStatus
S011-FR-001FunctionalP1parity test command availabilityImplemented
S011-FR-002FunctionalP1Required test configurationImplemented
S011-FR-003FunctionalP1Expected-test discoveryImplemented
S011-FR-004FunctionalP1Per-test command executionImplemented
S011-FR-005FunctionalP1Coverage artifact normalizationImplemented
S011-FR-006FunctionalP1Per-test report directory creationImplemented
S011-FR-007FunctionalP1Manifest generationImplemented
S011-FR-008FunctionalP1Automatic parity check handoffImplemented
S011-FR-009FunctionalP2--no-check behaviorImplemented
S011-FR-010FunctionalP2Output directory overrideImplemented
S011-FR-011FunctionalP2Placeholder expansionImplemented
S011-FR-012FunctionalP1Missing required config errorsImplemented
S011-FR-013FunctionalP1Failed test process handlingImplemented
S011-FR-014FunctionalP2No discovered tests behaviorImplemented
S011-FR-015FunctionalP1parity check compatibility of generated reportsImplemented
S011-FR-016FunctionalP1Native report schema and path validationImplemented
S011-FR-017FunctionalP1Coverage artifact path safetyImplemented
S011-IF-001InterfaceP1parity test CLI signatureImplemented
S011-IF-002InterfaceP1test config block schemaImplemented
S011-IF-003InterfaceP1Placeholder contractImplemented
S011-IF-004InterfaceP1Per-test report manifest schemaImplemented
S011-IF-005InterfaceP1Per-test report file schemaImplemented
S011-IF-006InterfaceP1Normalizer input formatsImplemented
S011-AS-001AcceptanceP1Generate one report per expected testImplemented
S011-AS-002AcceptanceP1Run parity check by default after generationImplemented
S011-AS-003AcceptanceP1--no-check skips follow-up analysisImplemented
S011-AS-004AcceptanceP1Missing test.command fails fastImplemented
S011-AS-005AcceptanceP1Missing test.coverage fails fastImplemented
S011-AS-006AcceptanceP2Output override changes report directoryImplemented
S011-AS-007AcceptanceP2Non-attribution runner artifact is normalizedImplemented
S011-AS-008AcceptanceP2Explicitly mapped tests participate in discoveryImplemented
S011-AS-009AcceptanceP1Missing coverage preserves prior reportsImplemented
S011-AS-010AcceptanceP1Dangerous output target is rejectedImplemented
S011-AS-011AcceptanceP1Runner timeout fails cleanlyImplemented
S011-AS-012AcceptanceP1Nested symlink and overlapping artifact targets are rejectedImplemented
S011-EC-001Edge CaseP1Config file path cannot be resolvedImplemented
S011-EC-002Edge CaseP1Discovered test command exits non-zeroImplemented
S011-EC-003Edge CaseP1Coverage artifact path does not exist after successful test runImplemented
S011-EC-004Edge CaseP2Source structure path does not existImplemented
S011-EC-005Edge CaseP2Expected test file does not existImplemented
S011-EC-006Edge CaseP2Report directory already existsImplemented
S011-EC-007Edge CaseP2Coverage target is a directory rather than a fileImplemented
S011-EC-008Edge CaseP2No expected tests are discoveredImplemented
S011-EC-009Edge CaseP1Runner process times outImplemented
S011-EC-010Edge CaseP1Report output target is destructive or unownedImplemented
S011-EC-011Edge CaseP1Fixed temporary config path already existsImplemented
S011-EC-012Edge CaseP1Manifest report path escapes the report rootImplemented
S011-EC-013Edge CaseP1Coverage artifact is unownedImplemented
S011-EC-014Edge CaseP1Artifact path has a symlink ancestorImplemented
S011-EC-015Edge CaseP1Coverage target overlaps report outputImplemented
S011-SC-001SuccessP1Generated report set is consumable by parity checkImplemented
S011-SC-002SuccessP1Same input project produces deterministic manifest contentsImplemented
S011-SC-003SuccessP1One failing individual test causes command failureImplemented
S011-SC-004SuccessP1Generated reports preserve file-local attribution needed for matched coverageImplemented
S011-SC-005SuccessP1Failed generation preserves the last complete report setImplemented
S011-SC-006SuccessP1Unsafe paths cannot delete unrelated dataImplemented
S011-SC-007SuccessP1Report parsing remains contained beneath reports/Implemented
S011-SC-008SuccessP1Runner artifacts are removed after every attemptImplemented

Cross-Spec Dependencies

  • Depends on: S001 (CLI command invocation and exit-code behavior), S003 (coverage readers and normalized attribution structures), S006 (configuration and structure discovery), S008 (output format behavior of delegated parity check)
  • Required by: S003 (Parity per-test report directory is a supported reader input)
  • Required by: S010 (samples and CI may use parity test to generate attribution-capable artifacts)