use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class GenerateStoriesView method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
Embedder embedder = newEmbedder();
getLog().info("Generating stories view using embedder " + embedder);
try {
embedder.generateReportsView();
} catch (RuntimeException e) {
throw new MojoFailureException("Failed to generate stories view", e);
}
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class ReportStepdocsAsEmbeddables method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
Embedder embedder = newEmbedder();
getLog().info("Reporting stepdocs as embeddables using embedder " + embedder);
try {
embedder.reportStepdocsAsEmbeddables(classNames());
} catch (RuntimeException e) {
throw new MojoFailureException("Failed to report stepdocs as embeddables", e);
}
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class RunStoriesAsEmbeddables method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
Embedder embedder = newEmbedder();
getLog().info("Running stories as embeddables using embedder " + embedder);
try {
embedder.runAsEmbeddables(classNames());
} catch (RuntimeException e) {
throw new MojoFailureException("Failed to run stories as embeddables", e);
}
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class AbstractEmbedderTask method newEmbedder.
/**
* Creates an instance of Embedder, either using
* {@link #injectableEmbedderClass} (if set) or defaulting to
* {@link #embedderClass}.
*
* @return An Embedder
*/
protected Embedder newEmbedder() {
Embedder embedder = null;
EmbedderClassLoader classLoader = classLoader();
if (injectableEmbedderClass != null) {
embedder = classLoader.newInstance(InjectableEmbedder.class, injectableEmbedderClass).injectedEmbedder();
} else {
embedder = classLoader.newInstance(Embedder.class, embedderClass);
}
URL codeLocation = codeLocation();
if (codeLocation != null) {
embedder.configuration().storyReporterBuilder().withCodeLocation(codeLocation);
}
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);
}
if (!systemProperties.isEmpty()) {
embedder.useSystemProperties(systemProperties);
}
return embedder;
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class GenerateStoriesView method execute.
public void execute() throws BuildException {
Embedder embedder = newEmbedder();
log("Generating stories view using embedder " + embedder, MSG_INFO);
embedder.generateReportsView();
}
Aggregations