Class ResponseCoverageTrackerSource
- All Implemented Interfaces:
TrackerSource
TrackerSource for the Doppelganger API Detector's response-coverage-history NDJSON, one
record per line with fields fingerprint, verb, path,
responseCode, testCount, firstDeclaredAt, firstCoveredAt,
lastSeenAt, removedAt.
This module has no code dependency on doppelganger-api-detector; the schema below is
hand-parsed directly from the known, fixed NDJSON shape that plugin's own
ResponseCoverageHistoryStore writes - see this class's Javadoc rather than any shared
code for the field-by-field mapping.
Stages, in canonical order: declared, covered - a true dependency chain, since
a response code can never be covered by a contract test without first being declared. Each
record's LifecycleRecord.group() is the response code's class ("2xx",
"4xx", "5xx", ...), derived from responseCode alone - see
responseCodeClass(String) - so downstream group-partitioned views (e.g. a
coverage-by-class chart) need no further code dependency on this class either, only on
LifecycleRecord.group() itself. testCount - a live gauge, not a milestone - is
deliberately not carried onto LifecycleRecord at all, since that type has no field for
one; a template needing it reads ResponseCoverageMatrixReader's output instead.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newResponseCoverageTrackerSource. -
Method Summary
Modifier and TypeMethodDescriptionReadshistoryFileand returns theLifecycleRecords it contains.
-
Constructor Details
-
ResponseCoverageTrackerSource
public ResponseCoverageTrackerSource()Creates a newResponseCoverageTrackerSource.
-
-
Method Details
-
read
Description copied from interface:TrackerSourceReadshistoryFileand returns theLifecycleRecords it contains.- Specified by:
readin interfaceTrackerSource- Parameters:
historyFile- the NDJSON history file; guaranteed by the caller to exist- Returns:
- the parsed records; a line that fails to parse is skipped rather than failing the read
-