I have gone though the JBehave official docs and have started making a sample project work. I am clear with the
1. Step1 : Write a story
2. Step2 : Map steps to Java
I am stuck in “Configure Stories” step. There are many options like extending JUnitStories, JUnitStory, Embedder etc.
Which one to use ?
And how can I make a simple configure story class work.
.withFormats(CONSOLE, TXT, HTML, XML)) is deprecated, so what to use in that place ?
Basically if I directly take the code snippet provided, it gives compilation errors.
Could someone help.
The reference link : http://jbehave.org/reference/stable/index.html
JUnitStory: provides a one-to-one mapping with the textual story via the StoryPathResolver.
JUnitStories: provides a many-to-one mapping with the textual story paths explicitly specified by overriding the storyPaths() method.For your case, extending JUnitStories shall be enough.
For the format, please use it as following: StoryReporterBuilder().withDefaultFormats().withFormats(Format.HTML, Format.CONSOLE);