Features of JBehave

JBehave is a framework for Behaviour-Driven Development (BDD).

Features of JBehave include:

  • Pure Java implementation, which plays well with Java-based enterprises or when interfacing to any environment that exposes a Java API.
  • Users can specify and run text-based user stories, which allows "out-in" development.
  • User stories can be written in JBehave syntax or Gherkin syntax.
  • User stories can be specified as classpath resources or external URL-based resources.
  • User stories can be executed concurrently, specifying the number of concurrent threads.
  • User stories can be documented via generic user-defined meta information that allows easy story filtering and organisation into story maps.
  • Annotation-based binding of textual steps to Java methods, with auto-conversion of string arguments to any parameter type (including generic types) via custom parameter converters.
  • Annotation-based configuration and Steps class specifications
  • Dependency Injection support allowing both configuration and Steps instances composed via your favourite container (Guice, Needle, PicoContainer, Spring, Weld).
  • Groovy scripting supported for writing configuration and Steps instances
  • Extensible story reporting: outputs stories executed in different human-readable file-based formats (HTML, TXT, XML). Fully style-able view.
  • Story cross reference report format in JSON and XML, consumable by external applications.
  • Auto-generation of pending steps so the build is not broken by a missing step, but has option to configure breaking build for pending steps.
  • Pluggable step prioritising strategy. Strategies bundled in core include: by priority field and by Levenshtein Distance.
  • Localisation of user stories, allowing them to be written in any language.
  • IDE integration: stories can be run as JUnit tests or other annotation-based unit test frameworks, providing easy integration with your favourite IDE.
  • Ant integration: allows stories to be run via Ant task
  • Maven integration: allows stories to be run via Maven plugin at given build phase

Want to learn more?

The Getting Started page will get you up and running in no time.