org.jbehave.core.embedder.Embedder Java Examples
The following examples show how to use
org.jbehave.core.embedder.Embedder.
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: GenericRunner.java From vividus with Apache License 2.0 | 6 votes |
@Override public void run() { Embedder embedder = configuredEmbedder(); if (embedder instanceof BatchedEmbedder) { try { ((BatchedEmbedder) embedder).runStoriesAsPaths(batchedPathFinder.findPaths()); } catch (IOException e) { throw new UncheckedIOException(e); } } else { super.run(); } }
Example #2
Source File: AllureJbehaveTest.java From allure-java with Apache License 2.0 | 6 votes |
private AllureResults runStories(final String... storyResources) { final AllureResultsWriterStub writer = new AllureResultsWriterStub(); final AllureLifecycle lifecycle = new AllureLifecycle(writer); final Embedder embedder = new Embedder(); embedder.useEmbedderMonitor(new NullEmbedderMonitor()); embedder.useEmbedderControls(new EmbedderControls() .doGenerateViewAfterStories(false) .doFailOnStoryTimeout(false) .doBatch(false) .doIgnoreFailureInStories(true) .doIgnoreFailureInView(true) .doVerboseFailures(false) .doVerboseFiltering(false) ); final AllureJbehave allureJbehave = new AllureJbehave(lifecycle); embedder.useConfiguration(new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass())) .useStoryReporterBuilder(new ReportlessStoryReporterBuilder(temp.toFile()) .withReporters(allureJbehave) ) .useDefaultStoryReporter(new NullStoryReporter()) ); final InjectableStepsFactory stepsFactory = new InstanceStepsFactory( embedder.configuration(), new SimpleStorySteps(), new BrokenStorySteps() ); embedder.useCandidateSteps(stepsFactory.createCandidateSteps()); final AllureLifecycle cached = Allure.getLifecycle(); try { Allure.setLifecycle(lifecycle); embedder.runStoriesAsPaths(Arrays.asList(storyResources)); } finally { Allure.setLifecycle(cached); } return writer; }
Example #3
Source File: GenericRunner.java From vividus with Apache License 2.0 | 4 votes |
@Override public Embedder configuredEmbedder() { return embedder; }
Example #4
Source File: AbstractSpringJBehaveStory.java From angularjs-springmvc-sample-boot with Apache License 2.0 | 4 votes |
public AbstractSpringJBehaveStory() { Embedder embedder = new Embedder(); embedder.useEmbedderControls(embedderControls()); embedder.useMetaFilters(Arrays.asList("-skip")); useEmbedder(embedder); }