I am trying to create and run a simple JUnitStory to run a .story file.
I have it:
class Scenario1 extends JUnitStory { @Delegate MySteps steps = new MySteps() @Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromRelativeFile(new File('src/test/groovy').toURL())) .useStoryReporterBuilder( new StoryReporterBuilder() .withDefaultFormats() .withFormats(Format.HTML, Format.CONSOLE, Format.TXT) ); } @Override public List candidateSteps() { final candidateSteps = new InstanceStepsFactory(configuration(), this).createCandidateSteps() return candidateSteps; } }
With or without a delegate (copying and pasting all annotated MySteps methods), whenever I run JBehave, I get the following output:
somePattern(){
This is similar to individual stories that do not take steps.
When I create the Stories class and pull out all the story files using storyPaths
, the individual steps are defined. Using the debugger, I see that hitSteps hits, but it does not pull the data it needs.
What could be here?
Stefan kendall
source share