Class ReportTemplateRenderer

java.lang.Object
com.arc_e_tect.gradle.gherkin.progress.ReportTemplateRenderer

public class ReportTemplateRenderer extends Object
Renders a progress report from a user-supplied Mustache template, so that the generated AsciiDoc file references the snippets written by SnippetWriter via include:: directives instead of embedding their content verbatim.
  • Constructor Details

    • ReportTemplateRenderer

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

    • render

      public void render(File outputFile, File template, String systemUnderTestVersion, List<StatusSummary> summaries, Map<ScenarioStatus,StatusSnippets> snippets)
      Renders template to outputFile with no re-interpreted outlines to report - see render(File, File, String, List, Map, List), which this delegates to with an empty list, rendering the outlineExpansion context variable as the empty string.
      Parameters:
      outputFile - the AsciiDoc file to write
      template - the Mustache template file to render
      systemUnderTestVersion - version of the system under test that the reported scenarios exercise
      summaries - the classified scenarios and summary figures for each status, in display order
      snippets - the snippet file(s) written for each status
    • render

      public void render(File outputFile, File template, String systemUnderTestVersion, List<StatusSummary> summaries, Map<ScenarioStatus,StatusSnippets> snippets, List<ReinterpretedOutlines.Outline> reinterpretedOutlines)
      Renders template to outputFile, using summaries and snippets to build the Mustache context. Snippet paths in the context are relative to outputFile's directory, so plain include::<path>[] directives resolve correctly.
      Parameters:
      outputFile - the AsciiDoc file to write
      template - the Mustache template file to render
      systemUnderTestVersion - version of the system under test that the reported scenarios exercise
      summaries - the classified scenarios and summary figures for each status, in display order
      snippets - the snippet file(s) written for each status
      reinterpretedOutlines - the outlines this run has started reporting one scenario per Examples row, rendered into the outlineExpansion context variable; empty on every run that re-interprets none, which renders that variable as the empty string