Interface ReportBlockConverter


public interface ReportBlockConverter
Converts elements of the report model into standalone text blocks.
  • Method Details

    • convertStatisticsBlock

      String convertStatisticsBlock(com.google.common.collect.ListMultimap<String,ReportStatistics> featureStatistics, ReportStatistics totalStatistics)
      Convert a set of execution statistics into a statistics table.
      Parameters:
      featureStatistics - a map from feature names to statistics
      totalStatistics - the total statistics for all features combined
    • convertFeatureHeaderBlock

      String convertFeatureHeaderBlock(String featureName, ReportStatistics statistics, String description)
      Convert feature name and execution statistics into feature header.
      Parameters:
      featureName - the feature's name
      statistics - the execution statistics for the feature
      description - the description, may be null
    • convertScenarioHeaderBlock

      String convertScenarioHeaderBlock(String name, ExecutionStatus executionStatus, long duration, List<Tag> tagNames, String extendedDescription)
      Convert scenario name and more meta information into scenario header.

      The name corresponds to the test method name

      Parameters:
      name - the name of the scenario
      executionStatus - was the scenario successful
      duration - how long did the scenario run
      tagNames - names of the tags if scenario is tagged
      extendedDescription - detailed description of the scenario, may be null
    • convertCaseHeaderBlock

      String convertCaseHeaderBlock(int caseNr, ExecutionStatus executionStatus, long duration, String description)
      Convert scenario case number and parameters into case header.

      It is guaranteed that parameterNames.size() == caseArgument.size()

      Parameters:
      caseNr - the number of the case, starting from 1
      executionStatus - whether the case was successful
      duration - how long did the scenario case run
      description - a short description of this case, may be null
    • convertFirstStepBlock

      String convertFirstStepBlock(int depth, List<Word> words, StepStatus status, long durationInNanos, String extendedDescription, boolean caseIsUnsuccessful, String currentSectionTitle)
      Convert the words that make up the first step into a block.
      Parameters:
      depth - the depth of the step
      words - the words to be converted
      status - was the step executed successfully
      durationInNanos - how long did the step take
      extendedDescription - detailed description of the step, may be null
      caseIsUnsuccessful - was the scenario case executed successfully
      currentSectionTitle - the current section's title, may be null
    • convertStepBlock

      String convertStepBlock(int depth, List<Word> words, StepStatus status, long durationInNanos, String extendedDescription, boolean caseIsUnsuccessful)
      Convert the words that make up a step into a block.
      Parameters:
      depth - the depth of the step
      words - the words to be converted
      status - was the step executed successfully
      durationInNanos - how long did the step take
      extendedDescription - detailed description of the step, may be null
      caseIsUnsuccessful - was the scenario case executed successfully
    • convertCasesTableBlock

      String convertCasesTableBlock(CasesTable casesTable)
      Is invoked at the end of a scenario, when the scenario has multiple case and a data table.
      Parameters:
      casesTable - the data table of the scenario
    • convertCaseFooterBlock

      String convertCaseFooterBlock(String errorMessage, List<String> stackTraceLines)
      Is invoked if the case failed with an exception.
      Parameters:
      errorMessage - the message describing the error
      stackTraceLines - the stacktrace lines if present
    • convertScenarioFooterBlock

      String convertScenarioFooterBlock(ExecutionStatus executionStatus)
      Is invoked at the end of a scenario.
      Parameters:
      executionStatus - was the scenario successful