Package org.jbehave.core.reporters
Class JsonOutput
java.lang.Object
org.jbehave.core.reporters.NullStoryReporter
org.jbehave.core.reporters.PrintStreamOutput
org.jbehave.core.reporters.JsonOutput
- All Implemented Interfaces:
StoryReporter
Story reporter that outputs to a PrintStream, as JSON. It extends
PrintStreamOutput
, providing JSON-based default output
patterns, which can be overridden via the (PrintStream,Properties)
constructor.
- Author:
- Valery Yatsynovich
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jbehave.core.reporters.PrintStreamOutput
PrintStreamOutput.Format
-
Field Summary
Fields inherited from class org.jbehave.core.reporters.PrintStreamOutput
NL
-
Constructor Summary
ConstructorDescriptionJsonOutput
(PrintStream output, Properties outputPatterns, Keywords keywords) JsonOutput
(PrintStream output, Keywords keywords) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Formats event output by key, usually equal to the method name.protected void
print
(PrintStream output, String text) protected String
transformPrintingTable
(String text, String tableStart, String tableEnd) Methods inherited from class org.jbehave.core.reporters.PrintStreamOutput
afterComposedSteps, afterExamples, afterGivenStories, afterScenario, afterScenarios, afterScenarioSteps, afterStoriesSteps, afterStory, afterStorySteps, beforeComposedSteps, beforeExamples, beforeGivenStories, beforeScenario, beforeScenarios, beforeScenarioSteps, beforeStep, beforeStoriesSteps, beforeStory, beforeStorySteps, comment, compressFailureTrace, doCompressFailureTrace, doReportFailureTrace, dryRun, escape, example, failed, failedOutcomes, formatTable, formatVerbatim, givenStories, givenStories, ignorable, lifecycle, lookupPattern, narrative, notPerformed, overwritePattern, pending, print, reportFailureTrace, restarted, restartedStory, scenarioExcluded, storyCancelled, storyExcluded, successful, toString, transformPrintingVerbatim
Methods inherited from class org.jbehave.core.reporters.NullStoryReporter
pending, pendingMethods
-
Constructor Details
-
JsonOutput
-
JsonOutput
-
-
Method Details
-
print
- Overrides:
print
in classPrintStreamOutput
-
format
Description copied from class:PrintStreamOutput
Formats event output by key, usually equal to the method name.- Overrides:
format
in classPrintStreamOutput
- Parameters:
key
- the event keydefaultPattern
- the default pattern to return if a custom pattern is not foundargs
- the args used to format output- Returns:
- A formatted event output
-
transformPrintingTable
- Overrides:
transformPrintingTable
in classPrintStreamOutput
-