FAQ

What is BDD?

  • BDD stands for Behaviour-Driven Development and you can learn more about BBD from our BDD Resources.

What Java version is required by JBehave 2?

  • JBehave 2 uses Java 5 annotations, so any JDK 1.5+ will work.

How do I use JBehave within my development environment?

  • Scenarios can be run as JUnit 4 tests, which provides easy integration with your favourite IDE.

What are the libraries that JBehave 2 depends on?

  • The jbehave-core only requires junit 4.x in the classpath.
  • The jbehave-maven-plugin also depends on other libraries (Ant for scenario scanning and Maven Plugin API) that are automatically included in the classpath.

Eclipse can’t seem to find annotations if they are contained within a jar

  • Some versions of Eclipse need to be aware of the JBehave source to enable the JUnit plugin for scenarios, as they can’t spot the @Test annotation in a class jar. The link to the core sources is available from the download page.
  • Alternatively, Maven users can add the sources automatically to the build path, as detailed in the Maven plugin page.

How do I make my scenarios fail when steps are not matched and are shown as pending?

new Configuration(){
   public PendingErrorStrategy forPendingSteps() {
       return PendingErrorStrategy.FAILING;
   }
}