3

I am using JUnitReportingRunner as below in jbehave .feature file in eclipse. But only BeforeStories and AfterStories are run and the .feature file is not getting executed. Here is the code and error. Please help. What could be the issue? Any help is much appreciated.

@RunWith(JUnitReportingRunner.class)

public class CalcConfig extends JUnitStories {

    public CalcConfig() {
        JUnitReportingRunner.recommandedControls(configuredEmbedder());
    }
...

Here is the error I am getting:

Failed to run story test/resources/calculator/Calculator.feature
java.lang.AbstractMethodError:  de.codecentric.jbehave.junit.monitoring.JUnitScenarioReporter.lifecyle(Lorg/jbehave/core/model/Lifecycle;)V
at org.jbehave.core.reporters.DelegatingStoryReporter.lifecyle(DelegatingStoryReporter.java:79)
at org.jbehave.core.reporters.ConcurrentStoryReporter.lifecyle(ConcurrentStoryReporter.java:137)
at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:277)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:220)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:181)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)

(AfterStories)

Generating reports view to '/Documents/workspace/Calculator/jbehave' using formats '[stats, stats, html, txt, console, junitscenarioreporter]' and view properties '{defaultFormats=stats, decorateNonHtml=true, viewDirectory=view, decorated=ftl/jbehave-report-decorated.ftl, reports=ftl/jbehave-reports-with-totals.ftl, maps=ftl/jbehave-maps.ftl, navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl}'
Reports view generated with 0 stories (of which 0 pending) containing 0 scenarios (of which 0 pending)
declension
  • 4,110
  • 22
  • 25

1 Answers1

3

I've got the same error on my site. My problem was, that I was using a wrong version of JBehave. Please make sure the version of JBehave matches JBehave-Junit-Runner.

Especially, the 3.9-SNAPSHOT version of JBehave introduces an additional method lifecycle, which is not implemented by the JUnitScenarioReporter.

The fix is trivial, so I'll pull it to github today.

Simon Zambrovski
  • 746
  • 6
  • 18
  • The commit is already in [Github](https://github.com/holisticon/jbehave-junit-runner/commit/922ce6b707f71b2acad5b6b6c0a84278663e21af). You might just check it out and build a local working snapshot on your own. – Simon Zambrovski Nov 20 '13 at 08:06