Commit 117ef7ff authored by root's avatar root

TestBuDDy - push: PROJECT REPO CLEANED at 2019-06-05 10:25:46.127301

parent 02b5affb
Pipeline #2137 passed with stages
in 1 minute and 13 seconds
import java.text.SimpleDateFormat;
import java.util.*;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.configuration.MostUsefulConfiguration;
import org.jbehave.core.embedder.PropertyBasedEmbedderControls;
import org.jbehave.core.io.CodeLocations;
import org.jbehave.core.io.LoadFromClasspath;
import org.jbehave.core.io.StoryFinder;
import org.jbehave.core.junit.JUnitStories;
import org.jbehave.core.reporters.*;
import org.jbehave.core.steps.*;
/**
* generic binder for all JBehave tests. Binds all the story files to the
* step files
*
* @author testbuddy
*/
public class TestbuddyRunnerTest extends JUnitStories {
private final CrossReference xref = new CrossReference();
public TestbuddyRunnerTest() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(false)
.doIgnoreFailureInStories(false).doIgnoreFailureInView(true)
.doVerboseFailures(true).useThreads(2).useStoryTimeouts("1500");
configuredEmbedder().useEmbedderControls(new PropertyBasedEmbedderControls());
}
@Override
public Configuration configuration() {
if (super.hasConfiguration()) {
return super.configuration();
}
return new MostUsefulConfiguration()
.useStoryLoader(new LoadFromClasspath(this.getClass()))
.useStoryReporterBuilder(new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass()))
.withDefaultFormats().withPathResolver(new FilePrintStreamFactory.ResolveToPackagedName())
.withFormats(Format.CONSOLE, Format.TXT, Format.HTML)
.withCrossReference(new CrossReference())
.withRelativeDirectory("jbehave-reports")
.withFailureTraceCompression(true).withCrossReference(xref))
.useParameterConverters(new ParameterConverters().
addConverters(new ParameterConverters.DateConverter(new SimpleDateFormat("yyyy-MM-dd")))) // use custom date pattern
.useStepMonitor(new SilentStepMonitor());
}
@Override
public InjectableStepsFactory stepsFactory() {
ArrayList<Steps> stepFileList = new ArrayList<>();
/*test-buddy modules - start*/
stepFileList.add(new testmodule1_200Steps());
/*test-buddy modules - end*/
return new InstanceStepsFactory(configuration(), stepFileList);
}
protected List<String> storyPaths() {
return new StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()),
/*test-buddy stories - start*/
Arrays.asList("**/*.story"),
Arrays.asList(""));
/*test-buddy stories - end*/
}
}
\ No newline at end of file
import org.jbehave.core.annotations.*;
import org.jbehave.core.steps.Steps;
import org.junit.Assert;
/**
* Testbuddy generated steps file
* @author testbuddy
*
*/
/*---testbuddy---module---testmodule1_200---*/
public class testmodule1_200Steps extends Steps {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment