Class AbstractReportGenerator

java.lang.Object
com.tngtech.jgiven.report.AbstractReportGenerator
Direct Known Subclasses:
AsciiDocReportGenerator, PlainTextReportGenerator

public abstract class AbstractReportGenerator extends Object
This abstract class is the basic layout that includes the minimal functionality for reading/writing a report The following flags are predefined in AbstractReportConfig.createConfigOptions():
  • --format=
  • --sourceDir= /--dir=
  • --targetDir= /--todir=
  • --title=
  • --exclude-empty-scenarios=<boolean>
  • --help / -h
Everything has a default value. The functionality is piped together for an easier and extendable interface to create a custom report For examples see AsciiDocReportGenerator
  • Field Details

  • Constructor Details

    • AbstractReportGenerator

      public AbstractReportGenerator()
  • Method Details

    • setConfig

      public void setConfig(AbstractReportConfig config)
    • generateFromCommandLine

      protected void generateFromCommandLine(String... args)
    • generateWithConfig

      public void generateWithConfig(AbstractReportConfig config)
    • loadReportModel

      public void loadReportModel()
    • createReportConfig

      public abstract AbstractReportConfig createReportConfig(String... args)
      Parameters:
      args - these are the command line arguments
      Returns:
      an AbstractReportConfig where any option may be accessible via setter and getter
    • generate

      public abstract void generate() throws Exception
      This implements the main functionality of the report generator, utilizing the information from the specialized AbstractReportConfig
      Throws:
      Exception