Examples of embedderControls()


Examples of org.jbehave.core.embedder.Embedder.embedderControls()

    @Test
    public void runClasspathLoadedStoriesAsJUnit() {
        // CoreEmbedder defines the configuration and steps factory
        Embedder embedder = new CoreEmbedder();
        embedder.embedderControls().doIgnoreFailureInStories(true);
        List<String> storyPaths = new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
        embedder.runStoriesAsPaths(storyPaths);
    }

}
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

        embedder.useClassLoader(classLoader);
        embedder.useEmbedderControls(embedderControls());
        if (executorsClass != null) {
            ExecutorServiceFactory executorServiceFactory = classLoader.newInstance(ExecutorServiceFactory.class,
                    executorsClass);
            embedder.useExecutorService(executorServiceFactory.create(embedder.embedderControls()));
        }
        embedder.useEmbedderMonitor(embedderMonitor());
        if (!metaFilters.isEmpty()) {
            embedder.useMetaFilters(metaFilters);
        }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

            }
        };
        // When
        Embedder embedder = mojo.newEmbedder();
        // Then
        EmbedderControls embedderControls = embedder.embedderControls();
        assertThat(embedderControls.batch(), is(false));
        assertThat(embedderControls.generateViewAfterStories(), is(true));
        assertThat(embedderControls.ignoreFailureInStories(), is(false));
        assertThat(embedderControls.ignoreFailureInView(), is(false));
        assertThat(embedderControls.threads(), is(1));
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

        mojo.storyTimeoutInSecs = 60;
        mojo.failOnStoryTimeout = true;
        mojo.threads = 2;
        Embedder embedder = mojo.newEmbedder();
        // Then
        EmbedderControls embedderControls = embedder.embedderControls();
        assertThat(embedderControls.batch(), is(true));
        assertThat(embedderControls.generateViewAfterStories(), is(false));
        assertThat(embedderControls.ignoreFailureInStories(), is(true));
        assertThat(embedderControls.ignoreFailureInView(), is(true));
        assertThat(embedderControls.skip(), is(true));
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

        boolean verboseFiltering = control(finder, "verboseFiltering");
        long storyTimeoutInSecs = finder.getAnnotatedValue(UsingEmbedder.class, Long.class, "storyTimeoutInSecs");
        boolean failOnStoryTimeout = control(finder, "failOnStoryTimeout");
        int threads = finder.getAnnotatedValue(UsingEmbedder.class, Integer.class, "threads");
        Embedder embedder = embedder();
        embedder.embedderControls().doBatch(batch).doSkip(skip).doGenerateViewAfterStories(generateViewAfterStories)
                .doIgnoreFailureInStories(ignoreFailureInStories).doIgnoreFailureInView(ignoreFailureInView)
                .doVerboseFailures(verboseFailures).doVerboseFiltering(verboseFiltering).useStoryTimeoutInSecs(storyTimeoutInSecs)
                .doFailOnStoryTimeout(failOnStoryTimeout).useThreads(threads);
        Configuration configuration = buildConfiguration();
        embedder.useConfiguration(configuration);
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

        embedder.useClassLoader(classLoader);
        embedder.useEmbedderControls(embedderControls());
        if ( executorsClass != null ){
            ExecutorServiceFactory executorServiceFactory = classLoader.newInstance(ExecutorServiceFactory.class, executorsClass);
            embedder.useExecutorService(executorServiceFactory.create(embedder.embedderControls()));
        }
        embedder.useEmbedderMonitor(embedderMonitor());
        if (isNotEmpty(metaFilters)) {
            List<String> filters = new ArrayList<String>();
            for (String filter : metaFilters) {
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

public class ThreadsStories extends JUnitStories {

    public ThreadsStories() {
        Embedder embedder = configuredEmbedder();
        embedder.embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
                .doIgnoreFailureInView(true).doVerboseFiltering(true).useThreads(1).useStoryTimeoutInSecs(7).doFailOnStoryTimeout(false);
        embedder.useMetaFilters(Arrays.asList("groovy: story_path ==~ /.*long.*/"));
    }

    @Override
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

public class PerformanceStories extends JUnitStories {

    public PerformanceStories() {
        Embedder embedder = configuredEmbedder();
        embedder.embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
                .doIgnoreFailureInView(true);
    }

    @Override
    public Configuration configuration() {
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

        AbstractEmbedderTask task = new AbstractEmbedderTask() {
        };
        // When
        Embedder embedder = task.newEmbedder();
        // Then
        EmbedderControls embedderControls = embedder.embedderControls();
        assertThat(embedderControls.batch(), is(false));
        assertThat(embedderControls.generateViewAfterStories(), is(true));
        assertThat(embedderControls.ignoreFailureInStories(), is(false));
        assertThat(embedderControls.ignoreFailureInView(), is(false));
        assertThat(embedderControls.verboseFailures(), is(false));
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder.embedderControls()

        task.setStoryTimeoutInSecs(60);
        task.setFailOnStoryTimeout(true);
        task.setThreads(2);
        Embedder embedder = task.newEmbedder();
        // Then
        EmbedderControls embedderControls = embedder.embedderControls();
        assertThat(embedderControls.batch(), is(true));
        assertThat(embedderControls.generateViewAfterStories(), is(false));
        assertThat(embedderControls.ignoreFailureInStories(), is(true));
        assertThat(embedderControls.ignoreFailureInView(), is(true));
        assertThat(embedderControls.verboseFailures(), is(true));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.