Cucumber logo

Cucumber

Open SourcePopular

BDD framework using Gherkin's plain-language syntax to bridge business and engineering test specs.

Visit websiteGitHub

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

Medium

Maintenance

Medium

Learning

Intermediate

Licence

Free / Open source

// 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

ToolChoose it when
Serenity BDDYou want Cucumber plus rich living-documentation reporting on the JVM.
JBehaveYou want a Java-native BDD framework (story-based).
KarateYou 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

  1. BEHAVIOR-DRIVEN DEVELOPMENT

    Capture executable specs in Given/When/Then so PMs, devs, and QA share one source of truth.

  2. ACCEPTANCE TESTING

    Drive Selenium, Playwright, or REST clients from feature files to validate user-facing behaviour.

  3. 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

  1. Add Cucumber for your language

  2. Write Gherkin .feature files collaboratively

  3. Implement step definitions

  4. Bind steps to automation (UI/API)

  5. Run via JUnit/CLI in CI

  6. Publish living-documentation reports

// RELATED QA.CODES RESOURCES