Class ScreenshotHtmlOutput

  • All Implemented Interfaces:
    org.jbehave.core.reporters.StoryReporter

    public class ScreenshotHtmlOutput
    extends org.jbehave.core.reporters.HtmlOutput
    Render screenshots for success and error at report
    Author:
    Daniel Keiss <daniel.keiss@telekom.de>

    Copyright (c) 2020 Daniel Keiss, Deutsche Telekom IT GmbH This file is distributed under the conditions of the Apache License, Version 2.0. For details see the file license on the toplevel.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jbehave.core.reporters.PrintStreamOutput

        org.jbehave.core.reporters.PrintStreamOutput.Format
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beforeStory​(org.jbehave.core.model.Story story, boolean givenStory)  
      void failed​(String step, Throwable storyFailure)  
      protected boolean failedScreenshot​(String step, Throwable storyFailure)  
      protected void failedScreenshotPattern()  
      void successful​(String step)  
      protected boolean successfulScreenshot​(String step)  
      protected void successScreenshotPattern()  
      • Methods inherited from class org.jbehave.core.reporters.PrintStreamOutput

        afterExamples, afterGivenStories, afterScenario, afterStory, afterStorySteps, beforeExamples, beforeGivenStories, beforeScenario, beforeStep, beforeStorySteps, comment, compressFailureTrace, doCompressFailureTrace, doReportFailureTrace, dryRun, escape, example, failedOutcomes, format, formatTable, formatVerbatim, givenStories, givenStories, ignorable, lifecyle, lookupPattern, narrative, notPerformed, overwritePattern, pending, pendingMethods, print, print, reportFailureTrace, restarted, restartedStory, scenarioNotAllowed, storyCancelled, storyNotAllowed, toString, transformPrintingTable, transformPrintingVerbatim
      • Methods inherited from class org.jbehave.core.reporters.NullStoryReporter

        afterScenarioSteps, beforeScenario, beforeScenarioSteps, example, scenarioMeta
    • Field Detail

      • screenshotsOnSuccess

        protected final boolean screenshotsOnSuccess
      • currentStoryFolder

        protected String currentStoryFolder
    • Constructor Detail

      • ScreenshotHtmlOutput

        public ScreenshotHtmlOutput​(PrintStream output,
                                    org.jbehave.core.reporters.StoryReporterBuilder reporterBuilder,
                                    boolean screenshotsOnSuccess,
                                    ScreenshotCreator screenshotCreator,
                                    CurrentStory currentStory)
    • Method Detail

      • successScreenshotPattern

        protected void successScreenshotPattern()
      • failedScreenshotPattern

        protected void failedScreenshotPattern()
      • beforeStory

        public void beforeStory​(org.jbehave.core.model.Story story,
                                boolean givenStory)
        Specified by:
        beforeStory in interface org.jbehave.core.reporters.StoryReporter
        Overrides:
        beforeStory in class org.jbehave.core.reporters.PrintStreamOutput
      • successful

        public void successful​(String step)
        Specified by:
        successful in interface org.jbehave.core.reporters.StoryReporter
        Overrides:
        successful in class org.jbehave.core.reporters.PrintStreamOutput
      • successfulScreenshot

        protected boolean successfulScreenshot​(String step)
      • failed

        public void failed​(String step,
                           Throwable storyFailure)
        Specified by:
        failed in interface org.jbehave.core.reporters.StoryReporter
        Overrides:
        failed in class org.jbehave.core.reporters.PrintStreamOutput
      • failedScreenshot

        protected boolean failedScreenshot​(String step,
                                           Throwable storyFailure)