Examples of StoryReporterBuilder


Examples of org.jbehave.core.reporters.StoryReporterBuilder

    @Override
  public Configuration configuration() {
    Class<? extends CoreEmbedder> embedderClass = this.getClass();
    return new MostUsefulConfiguration()
      .useStoryLoader(new LoadFromClasspath(embedderClass.getClassLoader()))
      .useStoryReporterBuilder(new StoryReporterBuilder()
            .withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass))
            .withDefaultFormats()
        .withFormats(CONSOLE, TXT, HTML, XML)
        .withCrossReference(new CrossReference()))
            .useParameterConverters(new ParameterConverters()
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

                new ExamplesTableConverter(examplesTableFactory));
    return new MostUsefulConfiguration()           
                .useStoryLoader(new LoadFromClasspath(embeddableClass))
                .useStoryParser(new RegexStoryParser(examplesTableFactory))
                .useStoryReporterBuilder(
                        new StoryReporterBuilder()
                                .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                                .withDefaultFormats().withViewResources(viewResources)
                                .withFormats(contextFormat, CONSOLE, TXT, HTML_TEMPLATE, XML_TEMPLATE).withFailureTrace(true)
                                .withFailureTraceCompression(true).withCrossReference(xref))
                .useParameterConverters(parameterConverters)
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

                .useStoryControls(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false))
                .useStoryLoader(new LoadFromClasspath(embeddableClass))
                .useStoryParser(new RegexStoryParser(examplesTableFactory))
                .useStoryPathResolver(new UnderscoredCamelCaseResolver())
                .useStoryReporterBuilder(
                        new StoryReporterBuilder()
                                .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                                .withDefaultFormats().withPathResolver(new ResolveToPackagedName())
                                .withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
                                .withFailureTrace(true).withFailureTraceCompression(true).withCrossReference(xref))
                .useParameterConverters(parameterConverters)
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

        OutputStream out = new ByteArrayOutputStream();
        EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
        ViewGenerator viewGenerator = mock(ViewGenerator.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        embedder.configuration().useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats());
        embedder.configuration().useViewGenerator(viewGenerator);

        File outputDirectory = new File("target/output");
        List<String> formats = asList("html");
        Properties viewResources = new Properties();
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

    @Test
    public void shouldGenerateCrossReferenceWhenAvailable() {

        Embedder embedder = new Embedder();
        embedder.useConfiguration(new MostUsefulConfiguration().useStoryReporterBuilder(new StoryReporterBuilder()
                .withCrossReference(new CrossReference())));

        // When
        embedder.generateCrossReference();
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

        parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
                new ExamplesTableConverter(examplesTableFactory));
        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);
    }
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

    public static class MississipiCancelled extends JUnitStories {

        @Override
        public Configuration configuration() {
            return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(this.getClass()))
                    .useStoryReporterBuilder(new StoryReporterBuilder().withFormats(CONSOLE, HTML, XML));
        }
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

        @Override
        public Configuration configuration() {
            final XmlOutput xmlOutput = new XmlOutput(printStream);
           
            return new MostUsefulConfiguration().useStoryLoader(new MyStoryLoader()).useStoryReporterBuilder(
                    new StoryReporterBuilder() {
                        @Override
                        public StoryReporter build(String storyPath) {
                            if (storyPath.contains("format")) {
                                return xmlOutput;
                            } else {
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

public abstract class MyMultipleStory extends JUnitStory {
  public MyMultipleStory() {
        // Making sure this doesn't output to the build while it's running
        useConfiguration(new MostUsefulConfiguration()
            .useStoryReporterBuilder(new StoryReporterBuilder(){
                    @Override
                    public StoryReporter build(String storyPath) {
                        return new TxtOutput(new PrintStream(new ByteArrayOutputStream()));
                    }               
            }));
View Full Code Here

Examples of org.jbehave.core.reporters.StoryReporterBuilder

    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));
    }
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.