protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("**/" + System.getProperty("storyFilter", "*") + ".story"), null); } }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("**/" + System.getProperty("storyFilter", "*") + ".story"), null); }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths( codeLocationFromClass(this.getClass()), "**/*.story", "**/failing_before*.story"); }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "**/failing_before*.story"); }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/stories/*.story", ""); }
@Override public Configuration configuration() { final Configuration configuration = new MostUsefulConfiguration(); configuration.useStoryReporterBuilder(new RichReporterBuilder().withCodeLocation(CodeLocations.codeLocationFromClass(getClass()))); configuration.useStepMonitor(new PrintStreamStepMonitor()); configuration.usePendingStepStrategy(new FailingUponPendingStep()); configuration.useStepdocReporter(new PrintStreamStepdocReporter()); return configuration; }
@Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryParser(new RegexStoryParser(new ExamplesTableFactory(new LoadFromClasspath(this.getClass()), new TableTransformers()))) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass()))); }
.withFormats(formats.toArray(new Format[0])) .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass)) .withViewResources(viewResources) .withPathResolver(new FilePrintStreamFactory.ResolveToPackagedName())
@Override public Configuration configuration() { Class<? extends JSystemEmbedder> embedderClass = this.getClass(); StoryParser parser = null; switch (parserType) { case GHERKIN: parser = new GherkinStoryParser(); break; case REGEX: parser = new RegexStoryParser(); break; default: parser = new RegexStoryParser(); } return new MostUsefulConfiguration() .useStoryParser(parser) .useStoryLoader(new LoadFromClasspath(embedderClass.getClassLoader())) .useStoryReporterBuilder( new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass)) .withDefaultFormats() .withCodeLocation(CodeLocations.codeLocationFromPath(getReportsFolder())) .withFormats(org.jbehave.core.reporters.Format.CONSOLE, Format.HTML, Format.XML, Format.TXT).withCrossReference(new CrossReference())) .useStepPatternParser(new RegexPrefixCapturingPatternParser("%")) .useStepMonitor(new SilentStepMonitor()); }
.withFormats((Format[]) formats.toArray()) .withCrossReference(xref) .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass)) .withViewResources(viewResources) .withPathResolver(new FilePrintStreamFactory.ResolveToPackagedName())
@Test public void run() throws Throwable { 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(EtsyDotComStories.class)).withFailureTrace(true) .withFailureTraceCompression(true).withDefaultFormats().withFormats(formats) .withCrossReference(crossReference); Configuration configuration = injectedEmbedder().configuration(); configuration.useFailureStrategy(new FailingUponPendingStep()) .useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor) .useStoryLoader(new LoadFromClasspath(EtsyDotComStories.class)) .useStoryReporterBuilder(reporterBuilder); if (configuration instanceof SeleniumConfiguration) { SeleniumConfiguration seleniumConfiguration = (SeleniumConfiguration) configuration; seleniumConfiguration.useSeleniumContext(seleniumContext); } injectedEmbedder().runStoriesAsPaths(storyPaths()); }