org.jbehave.core.reporters.Format Java Examples
The following examples show how to use
org.jbehave.core.reporters.Format.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PortalStories.java From attic-rave with Apache License 2.0 | 6 votes |
protected PortalStories() { CrossReference crossReference = new CrossReference().withJsonOnly().withOutputAfterEachStory(true) .excludingStoriesWithNoExecutedScenarios(true); ContextView contextView = new LocalFrameContextView().sized(640, 120); SeleniumContext seleniumContext = new SeleniumContext(); SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView, seleniumContext, crossReference.getStepMonitor()); Format[] formats = new Format[]{new SeleniumContextOutput(seleniumContext), CONSOLE, WEB_DRIVER_HTML}; StoryReporterBuilder reporterBuilder = new StoryReporterBuilder() .withCodeLocation(codeLocationFromClass(this.getClass())).withFailureTrace(true) .withFailureTraceCompression(true).withDefaultFormats().withFormats(formats) .withCrossReference(crossReference); Configuration configuration = new SeleniumConfiguration().useSeleniumContext(seleniumContext) .useFailureStrategy(new FailingUponPendingStep()) .useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor) .useStoryLoader(new LoadFromClasspath(this.getClass())) .useStoryReporterBuilder(reporterBuilder); useConfiguration(configuration); ApplicationContext context = new SpringApplicationContextFactory("applicationContext-tests.xml").createApplicationContext(); useStepsFactory(new SpringStepsFactory(configuration, context)); }
Example #2
Source File: LogSearchBackendStories.java From ambari-logsearch with Apache License 2.0 | 5 votes |
@Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(LogSearchStoryLocator.getStoryLoader(BACKEND_STORIES_LOCATION_PROPERTY, this.getClass())) .useStoryReporterBuilder( new StoryReporterBuilder().withFailureTrace(true).withDefaultFormats().withFormats(Format.CONSOLE, Format.TXT)); }
Example #3
Source File: JBehaveTest.java From Test-Driven-Java-Development-Second-Edition with MIT License | 5 votes |
@Override public Configuration configuration() { Properties viewResources = new Properties(); viewResources.put("decorateNonHtml", "true"); return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass())) .useStoryPathResolver(new StoryResolver()) .useStoryReporterBuilder(new StoryReporterBuilder() .withViewResources(viewResources) .withCodeLocation( CodeLocations.codeLocationFromPath("build/reports/jbehave")) .withFailureTrace(true) .withDefaultFormats() .withFormats(Format.CONSOLE, Format.HTML)); }
Example #4
Source File: JBConfiguratorImpl.java From colibri-ui with Apache License 2.0 | 5 votes |
@Override public Configuration createConfig() { Configuration configuration = new Configuration() { }; configuration.useStoryReporterBuilder( new StoryReporterBuilder() .withDefaultFormats() .withFormats(Format.CONSOLE) .withReporters(allureReporter)); configuration.useStoryControls(new StoryControls().doResetStateBeforeScenario(true)); configuration.parameterConverters().addConverters(new ParameterConverters.EnumConverter()); return configuration; }
Example #5
Source File: JBConfiguratorImpl.java From colibri-ui with Apache License 2.0 | 5 votes |
@Override public Configuration createConfig(ViewGenerator viewGenerator, Format... formats) { Configuration configuration = new MostUsefulConfiguration(); configuration.useStoryReporterBuilder( new StoryReporterBuilder() .withFormats(formats)) .useViewGenerator(viewGenerator); configuration.useStoryControls(new StoryControls().doResetStateBeforeScenario(true)); configuration.parameterConverters().addConverters(new ParameterConverters.EnumConverter()); return configuration; }
Example #6
Source File: UserRegistrationScenarios.java From user-registration-V2 with Apache License 2.0 | 5 votes |
@Override public Configuration configuration() { LocalizedKeywords keywords = new LocalizedKeywords(new Locale("de")); return new MostUsefulConfiguration() .useKeywords(keywords) .useStepCollector(new MarkUnmatchedStepsAsPending(keywords)) .useStoryParser(new RegexStoryParser(keywords)) .useStoryLoader(new LoadFromClasspath(this.getClass())) .useFailureStrategy(new RethrowingFailure()) .useStoryReporterBuilder( new StoryReporterBuilder().withKeywords(keywords) .withFormats(Format.HTML, Format.ANSI_CONSOLE) .withFailureTrace(true)); }
Example #7
Source File: Stories.java From metrics-kafka with Apache License 2.0 | 5 votes |
@Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass())) .useStoryReporterBuilder(new StoryReporterBuilder() .withFormats(Format.TXT) .withRelativeDirectory("../build/jbehave/")); }
Example #8
Source File: Runner.java From Test-Driven-Java-Development-Second-Edition with MIT License | 4 votes |
private StoryReporterBuilder getReporter() { return new StoryReporterBuilder() .withPathResolver(new FilePrintStreamFactory.ResolveToSimpleName()) .withDefaultFormats() .withFormats(Format.CONSOLE, Format.HTML); }
Example #9
Source File: UserRegistrationScenarios.java From user-registration-V2 with Apache License 2.0 | 4 votes |
@Override public Configuration configuration() { return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(this.getClass())) .useFailureStrategy(new RethrowingFailure()).useStoryReporterBuilder(new StoryReporterBuilder() .withFormats(Format.HTML, Format.ANSI_CONSOLE).withFailureTrace(true)); }
Example #10
Source File: IJBConfigurator.java From colibri-ui with Apache License 2.0 | votes |
Configuration createConfig(ViewGenerator viewGenerator, Format... formats);