Package org.fhirfrog.frog.rendering
package org.fhirfrog.frog.rendering
FHIR TestReport Rendering.

This package provides functionality to render test execution results as FHIR TestReport resources and store them in various formats and locations.
Overview
The rendering module converts TestResult objects
into FHIR-compliant TestReport resources, which can then be stored as JSON/XML
files or posted to a FHIR server.
Components
TestReportRenderer- Converts TestResult to TestReportReportStorage- Interface for storing reportsFileSystemReportStorage- Stores reports as filesFhirServerReportStorage- Posts reports to FHIR server
Usage
// Render test result to TestReport
TestReportRenderer renderer = new TestReportRenderer();
TestReport report = renderer.render(testResult);
// Store as JSON file
ReportStorage storage = new FileSystemReportStorage(Path.of("reports"));
storage.store(report, "json");
// Or post to FHIR server
ReportStorage serverStorage = new FhirServerReportStorage("http://localhost:8080/fhir");
serverStorage.store(report, "json");
Rendering Flow
- See Also:
-
ClassDescriptionSame row model as
ExcelReportRenderer(both shareTestReportRowExtractor), but a plain CSV rather than an XLSX binary - for a consumer that wants to import into a spreadsheet tool other than Excel, or script against the data directly, without needing an XLSX parser.One workbook, one row per operation/assertion across everyTestReportin a run - the #1 priority format (test managers), peradd-report-export-and-rest-api's design.md.Stores TestReport to a FHIR server via HTTP POST.Stores TestReport to file system.JUnit XML built from eachTestReport's ownsetup/test/teardownstructure (via the sharedTestReportRowExtractor), not fromfhir-frog-ant's olderJUnitExecutor.ExecutionResult/TestFailuremodel - seeadd-report-export-and-rest-api's design.md, task group 3.Same row model asExcelReportRenderer/CsvReportRenderer(all three shareTestReportRowExtractor), rendered as plain Markdown - an overall pass/fail summary up top, then a heading and an assertion table perTestReport.A readable, presentable document - this change's "execs" format per design.md's Decision 3 ("test managers get clear tables, execs get something presentable"), as opposed to the raw tabular Excel/CSV/Markdown formats.Renders TestReport in different formats.Storage interface for TestReport resources.Deprecated.One operation or assertion within aTestReport, flattened for the row/table-based renderers (Excel, CSV, Markdown, JUnit XML) - each of those needs the same shape, just encoded differently, so theTestReport-walking logic lives once inTestReportRowExtractorrather than being repeated per format.Flattens aTestReport'ssetup/test/teardownstructure intoTestReportRows - the one place this walk happens, shared by every row/table-based renderer (Excel, CSV, Markdown, JUnit XML) added byadd-report-export-and-rest-api.Same content shape asPdfReportRenderer- the "execs" format per design.md's Decision 3 (presentable, not a raw data dump) - as a.docxrather than a PDF, for a consumer who wants to edit/annotate the report (e.g. add reviewer comments) before circulating it further.
TestReportis now built incrementally during execution and available viaExecutionResult.getTestReport().