Class ScanContractsReportWriter
java.lang.Object
com.arc_e_tect.gradle.doppelganger.report.ScanContractsReportWriter
Writes the AsciiDoc
scanContracts report: for every endpoint both declared in the
OpenAPI documentation and implemented by a @RestController method, its declared response
codes and contract test count, plus - when includeResponseCoverage was enabled - a
per-response-code test count breakdown.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(File outputFile, List<EndpointResponseCoverage> coverage, boolean includeResponseCoverage, String systemUnderTestVersion, List<String> warnings, Map<String, ResponseCoverageRecord> responseCoverageHistory) Writes the report tooutputFile, creating its parent directory if necessary.
-
Constructor Details
-
ScanContractsReportWriter
public ScanContractsReportWriter()Creates a newScanContractsReportWriter.
-
-
Method Details
-
write
public void write(File outputFile, List<EndpointResponseCoverage> coverage, boolean includeResponseCoverage, String systemUnderTestVersion, List<String> warnings, Map<String, ResponseCoverageRecord> responseCoverageHistory) throws IOExceptionWrites the report tooutputFile, creating its parent directory if necessary.- Parameters:
outputFile- target AsciiDoc filecoverage- the coverage rows to render, one per declared-and-implemented endpointincludeResponseCoverage- whethercoverage's per-response-code breakdown was computed; whenfalse, only the declared response code count and contract test count are renderedsystemUnderTestVersion- version of the system under test that was scannedwarnings- non-fatal configuration gaps to render as aWARNINGadmonition right after the report header; when empty, no such admonition is writtenresponseCoverageHistory- response coverage history to render as a== Response Coverage Over Timesection, keyed by fingerprint; when empty, no such section is written- Throws:
IOException- if the output file cannot be written
-