Class ResponseCoverageTrackerSource

java.lang.Object
com.arc_e_tect.gradle.trackerlens.tracker.ResponseCoverageTrackerSource
All Implemented Interfaces:
TrackerSource

public class ResponseCoverageTrackerSource extends Object implements 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 Details

    • ResponseCoverageTrackerSource

      public ResponseCoverageTrackerSource()
      Creates a new ResponseCoverageTrackerSource.
  • Method Details

    • read

      public List<LifecycleRecord> read(File historyFile)
      Description copied from interface: TrackerSource
      Reads historyFile and returns the LifecycleRecords it contains.
      Specified by:
      read in interface TrackerSource
      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