Cucumber
BDD framework using Gherkin's plain-language syntax to bridge business and engineering test specs.
Pricing
Free / Open source
Type
Automation
Languages
JavaScript, TypeScript, Java, Ruby, Python, C#
Community
// VERDICT
Reach for Cucumber when you want collaborative, plain-language executable specs that business and QA share, across Java/JS/Ruby and more. Skip it when the Gherkin layer is overhead your team won't sustain or you prefer code-only tests.
Best for
The leading BDD framework - executable specifications in plain-language Gherkin (Given/When/Then) bound to step definitions, available across many languages, bridging business and automation.
Avoid when
Your team won't maintain Gherkin/step layers, you want code-only tests, or BDD's collaboration value isn't needed.
CI/CD fit
JUnit/CLI runners · Maven/Gradle/npm · CI + Gherkin reports
Languages
JavaScript · TypeScript · Java · Ruby · Python · C#
Team fit
BDD teams · Business + QA collaboration · Multi-language shops
Setup
Maintenance
Learning
Licence
// BEST FOR
- Plain-language Gherkin specs (Given/When/Then)
- Bridging business, QA and dev with shared language
- Step definitions binding scenarios to automation
- Available across Java, JS, Ruby and more
- Living documentation of behaviour
- Reusable steps across scenarios
// AVOID WHEN
- Your team won't maintain Gherkin/step layers
- You want code-only tests
- BDD collaboration value isn't needed
- The abstraction adds overhead without benefit
- Only engineers read/write the tests
- You want the lightest possible setup
// QUICK START
Add Cucumber for your language -> write .feature files (Given/When/Then) ->
implement step definitions binding to automation -> run via JUnit/CLI in CI ->
publish reports.// ALTERNATIVES TO CONSIDER
| Tool | Choose it when |
|---|---|
| Serenity BDD | You want Cucumber plus rich living-documentation reporting on the JVM. |
| JBehave | You want a Java-native BDD framework (story-based). |
| Karate | You want BDD-style API testing in one tool. |
// FEATURES
- Gherkin Given/When/Then scenarios as executable specifications
- Step definitions binding scenarios to driver code
- Hooks, tags, and scenario outlines for parametrisation
- Pretty, JUnit, and JSON reporters out of the box
- Implementations across major languages (JavaScript, Java, Ruby, others)
// PRIMARY USE CASES
BEHAVIOR-DRIVEN DEVELOPMENT
Capture executable specs in Given/When/Then so PMs, devs, and QA share one source of truth.
ACCEPTANCE TESTING
Drive Selenium, Playwright, or REST clients from feature files to validate user-facing behaviour.
LIVING DOCUMENTATION
Generate human-readable HTML reports from runs so scenarios double as up-to-date specs.
// PROS
- Industry standard for behaviour-driven testing
- Forces collaboration between BA, dev, and QA on shared scenarios
- Driver-agnostic — works with Selenium, Playwright, REST clients
- Vibrant ecosystem and decade-plus maturity
// CONS
- Adds a layer of indirection — overkill if BAs aren't reading scenarios
- Step-definition reuse needs discipline or scenarios drift
- Slower than running step code directly
// EXAMPLE QA WORKFLOW
Add Cucumber for your language
Write Gherkin .feature files collaboratively
Implement step definitions
Bind steps to automation (UI/API)
Run via JUnit/CLI in CI
Publish living-documentation reports
// RELATED QA.CODES RESOURCES
Cheat sheets
Glossary
Practice
Interview