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

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

Rendering Flow
See Also:
  • Class
    Description
    Same row model as ExcelReportRenderer (both share TestReportRowExtractor), 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 every TestReport in a run - the #1 priority format (test managers), per add-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 each TestReport's own setup/test/teardown structure (via the shared TestReportRowExtractor), not from fhir-frog-ant's older JUnitExecutor.ExecutionResult/TestFailure model - see add-report-export-and-rest-api's design.md, task group 3.
    Same row model as ExcelReportRenderer/CsvReportRenderer (all three share TestReportRowExtractor), rendered as plain Markdown - an overall pass/fail summary up top, then a heading and an assertion table per TestReport.
    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.
    The TestReport is now built incrementally during execution and available via ExecutionResult.getTestReport().
    One operation or assertion within a TestReport, flattened for the row/table-based renderers (Excel, CSV, Markdown, JUnit XML) - each of those needs the same shape, just encoded differently, so the TestReport-walking logic lives once in TestReportRowExtractor rather than being repeated per format.
    Flattens a TestReport's setup/test/teardown structure into TestReportRows - the one place this walk happens, shared by every row/table-based renderer (Excel, CSV, Markdown, JUnit XML) added by add-report-export-and-rest-api.
    Same content shape as PdfReportRenderer - the "execs" format per design.md's Decision 3 (presentable, not a raw data dump) - as a .docx rather than a PDF, for a consumer who wants to edit/annotate the report (e.g. add reviewer comments) before circulating it further.