java - Run jbehave stories from a user defined location -
i new jbehave
i trying execute jbehave through junit. seems jbehave loads story files classpath. possible configure fetch story files user defined path.
public class algebrastory extends junitstories { @override public configuration configuration() { return super.configuration() .usestoryreporterbuilder( new storyreporterbuilder() .withdefaultformats() .withformats(console, txt)); } @override public injectablestepsfactory stepsfactory() { return new instancestepsfactory(configuration(), new calculator()); } @override protected list<string> storypaths() { return new storyfinder().findpaths((<user defined path>, "**/algebra_story.story", ""); } }
in same way possible save jbehave reports in user defined path.
yes, can locate stories anywhere want in network. them in class path, or externally, locatable via urls. see locating stories.
and recommend learn jbehave through examples. one. in own opinion best way setup execution using embedders.
Comments
Post a Comment