org.jbehave.core.reporters.StoryReporterBuilder Java Examples
The following examples show how to use
org.jbehave.core.reporters.StoryReporterBuilder.
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: Stories.java From attic-rave with Apache License 2.0 | 6 votes |
@Override public Configuration configuration() { Class<? extends Embeddable> embeddableClass = this.getClass(); // Start from default ParameterConverters instance ParameterConverters parameterConverters = new ParameterConverters(); // factory to allow parameter conversion and loading from external resources (used by StoryParser too) ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(new LocalizedKeywords(), new LoadFromClasspath(embeddableClass), parameterConverters); // add custom converters parameterConverters.addConverters( new DateConverter(new SimpleDateFormat("yyyy-MM-dd")), new ParameterConverters.EnumConverter() ); return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(embeddableClass)) .useStoryParser(new RegexStoryParser(examplesTableFactory)) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass)) .withDefaultFormats() .withFormats(CONSOLE, TXT, HTML, XML)) .useParameterConverters(parameterConverters); }
Example #2
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 #3
Source File: AbstractSpringJBehaveStory.java From angularjs-springmvc-sample-boot with Apache License 2.0 | 5 votes |
private StoryReporterBuilder storyReporterBuilder() { return new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass())) .withPathResolver(new ResolveToPackagedName()) .withFailureTrace(true) .withDefaultFormats() .withFormats(IDE_CONSOLE, TXT, HTML); }
Example #4
Source File: IncreaseStoryLiveTest.java From tutorials with MIT License | 5 votes |
@Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass())) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(codeLocationFromClass(this.getClass())) .withFormats(CONSOLE)); }
Example #5
Source File: AbstractStory.java From tutorials with MIT License | 5 votes |
@Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass())) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(codeLocationFromClass(this.getClass())) .withFormats(CONSOLE)); }
Example #6
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 #7
Source File: ICanAddValues.java From chuidiang-ejemplos with GNU Lesser General Public License v3.0 | 5 votes |
@Override public Configuration configuration() { return new MostUsefulConfiguration() // where to find the stories .useStoryLoader(new LoadFromClasspath(this.getClass())) // CONSOLE and TXT reporting .useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(Format.CONSOLE, Format.TXT)); }
Example #8
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 #9
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 #10
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 #11
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 #12
Source File: LogSearchUIStories.java From ambari-logsearch with Apache License 2.0 | 5 votes |
@Override public Configuration configuration() { Class<? extends Embeddable> embeddableClass = this.getClass(); return new SeleniumConfiguration() .useSeleniumContext(context) .useWebDriverProvider(driverProvider) .useStoryLoader(LogSearchStoryLocator.getStoryLoader(UI_STORIES_LOCATION_PROPERTY, this.getClass())) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(codeLocationFromClass(embeddableClass)) .withDefaultFormats() .withFormats(CONSOLE, TXT, HTML, XML)); }
Example #13
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 #14
Source File: ExtendedConfiguration.java From vividus with Apache License 2.0 | 4 votes |
public void setStoryReporterBuilder(StoryReporterBuilder storyReporterBuilder) { useStoryReporterBuilder(storyReporterBuilder); }
Example #15
Source File: AllureFormat.java From colibri-ui with Apache License 2.0 | 4 votes |
@Override public StoryReporter createStoryReporter(FilePrintStreamFactory factory, StoryReporterBuilder storyReporterBuilder) { return allureReporter; }
Example #16
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 #17
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); }