Search in sources :

Example 26 with Embedder

use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.

the class ReportStepdocs method execute.

public void execute() throws BuildException {
    Embedder embedder = newEmbedder();
    log("Reporting stepdocs using embedder " + embedder, MSG_INFO);
    embedder.reportStepdocs();
}
Also used : Embedder(org.jbehave.core.embedder.Embedder)

Example 27 with Embedder

use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.

the class RunStoriesAsEmbeddables method execute.

public void execute() throws BuildException {
    Embedder embedder = newEmbedder();
    log("Running stories as Embeddables using embedder " + embedder, MSG_INFO);
    embedder.runAsEmbeddables(classNames());
}
Also used : Embedder(org.jbehave.core.embedder.Embedder)

Example 28 with Embedder

use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.

the class RunStoriesWithAnnotatedEmbedderRunner method execute.

public void execute() throws BuildException {
    Embedder embedder = newEmbedder();
    log("Running stories with annotated embedder runner", MSG_INFO);
    embedder.runStoriesWithAnnotatedEmbedderRunner(classNames());
}
Also used : Embedder(org.jbehave.core.embedder.Embedder)

Example 29 with Embedder

use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.

the class CoreStoryRunner method mapStories.

@Test
public void mapStories() {
    Embedder embedder = new Embedder();
    embedder.useMetaFilters(asList("+author *", "+theme *", "-skip"));
    List<String> storyPaths = new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
    embedder.mapStoriesAsPaths(storyPaths);
}
Also used : StoryFinder(org.jbehave.core.io.StoryFinder) Embedder(org.jbehave.core.embedder.Embedder) Test(org.junit.Test)

Example 30 with Embedder

use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.

the class CoreStoryRunner method runClasspathLoadedStoriesAsJUnit.

@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);
}
Also used : StoryFinder(org.jbehave.core.io.StoryFinder) Embedder(org.jbehave.core.embedder.Embedder) Test(org.junit.Test)

Aggregations

Embedder (org.jbehave.core.embedder.Embedder)56 Test (org.junit.Test)33 InjectableEmbedder (org.jbehave.core.InjectableEmbedder)25 ConfigurableEmbedder (org.jbehave.core.ConfigurableEmbedder)10 MojoFailureException (org.apache.maven.plugin.MojoFailureException)8 EmbedderControls (org.jbehave.core.embedder.EmbedderControls)7 Configuration (org.jbehave.core.configuration.Configuration)6 MostUsefulConfiguration (org.jbehave.core.configuration.MostUsefulConfiguration)6 File (java.io.File)5 Properties (java.util.Properties)5 Matchers.containsString (org.hamcrest.Matchers.containsString)5 UsingEmbedder (org.jbehave.core.annotations.UsingEmbedder)5 CandidateSteps (org.jbehave.core.steps.CandidateSteps)5 StoryPathResolver (org.jbehave.core.io.StoryPathResolver)4 HashSet (java.util.HashSet)3 Artifact (org.apache.maven.artifact.Artifact)3 Build (org.apache.maven.model.Build)3 MavenProject (org.apache.maven.project.MavenProject)3 ArchiverManager (org.codehaus.plexus.archiver.manager.ArchiverManager)3 StoryFinder (org.jbehave.core.io.StoryFinder)3