JBehave
Java-based BDD framework that runs scenarios written as plain-text stories with parameterised step definitions.
Pricing
Free / Open source
Type
Automation
Languages
Java
// VERDICT
Reach for JBehave when you want story-based BDD native to Java and value its model. Skip it when you want Cucumber's larger, multi-language ecosystem, a non-Java stack, or code-only tests.
Best for
A Java-native BDD framework - story-based executable specifications (Given/When/Then) mapped to Java steps, one of the original BDD tools for JVM teams.
Avoid when
You want the larger ecosystem and multi-language support of Cucumber, a non-Java stack, or code-only tests.
CI/CD fit
Maven/Gradle + JUnit · CI execution · story reports
Languages
Java
Team fit
Java BDD teams · Story-based specification · JVM acceptance testing
Setup
Maintenance
Learning
Licence
// BEST FOR
- Story-based BDD specifications for Java
- Given/When/Then steps mapped to Java methods
- One of the original JVM BDD frameworks
- Executable acceptance criteria
- Integration with the Java build/test stack
- Behaviour specs alongside JUnit
// AVOID WHEN
- You want Cucumber's larger ecosystem/multi-language support
- Your stack isn't Java
- You prefer code-only tests
- You want the most active community
- BDD overhead isn't justified
- The lightest setup is the priority
// QUICK START
Add JBehave (Maven/Gradle) -> write story files (Given/When/Then) -> implement
Java step classes -> run via JUnit in CI -> publish story reports.// ALTERNATIVES TO CONSIDER
| Tool | Choose it when |
|---|---|
| Cucumber | You want the larger, multi-language BDD ecosystem. |
| Serenity BDD | You want BDD with rich living-documentation reports. |
| Karate | You want BDD-style API testing. |
// FEATURES
- Story-based test format with Given/When/Then steps
- Annotation-driven step definitions in Java
- Composite steps for reusable scenarios
- JUnit integration for IDE and Surefire/Failsafe runs
- Configurable HTML, TXT, and XML reports
// PROS
- One of the original BDD frameworks — stable and well-understood
- Tight Spring and JUnit integration on the JVM
- Story-level lifecycle hooks suit complex setups
- Self-contained — no external runner needed
// CONS
- Java-only and slower-moving than Cucumber
- Smaller community and ecosystem than Cucumber-JVM
- Less polished tooling and reports than Serenity
// EXAMPLE QA WORKFLOW
Add JBehave to the JVM build
Write story files
Implement Java step classes
Map steps to automation
Run via JUnit in CI
Publish story reports
// RELATED QA.CODES RESOURCES
Cheat sheets
Glossary
Practice
Interview