Saturday, October 24, 2026 4,350 lists 78,096 records on file
List your app or device

  1. Home
  2. JavaScript Testing Frameworks
  3. Cucumber.js

Cucumber.js

What it is

Cucumber.js is the JavaScript implementation of Cucumber, a free, open-source tool for checking software against executable specifications. Teams write scenarios in Gherkin, a structured plain-text format usually saved in `.feature` files alongside the software in source control. Step definitions connect each Gherkin step to code that performs the described action. The command-line executable runs feature files and reports whether scenarios pass or fail; reporter plugins can create reports through built-in, separately installed, or custom options. Cucumber.js supports Behaviour-Driven Development, centred on discovery, collaboration, and examples, and can run in continuous integration. It is available as the `@cucumber/cucumber` npm module and can be installed as a development dependency with npm or Yarn. Setup requires Node.js and either package manager. It works with browser automation tools such as Selenium WebDriver, but is not itself a browser automation tool. Reports can be published with `--publish`; published reports are publicly accessible and deleted after 24 hours. Cucumber advises against defining environment variables containing secrets globally. The project describes this package as its stable canonical JavaScript implementation.

For and against

For

  • Free and open source.
  • Runs feature files from the command line.
  • Supports reporter plugins and continuous integration.
  • Can publish reports with `--publish`.

Against

  • Requires Node.js and npm or Yarn.
  • Global installation does not work with support files.
  • Published reports are public for up to 24 hours.
  • It is not a browser automation tool.

The verdict

Cucumber.js connects plain-text scenarios with code and reports scenario outcomes. Teams should account for its Node.js setup requirements and the public nature of published reports.

Who it suits

Cucumber.js suits JavaScript teams using Gherkin scenarios to define and check software behavior, particularly teams practicing Behaviour-Driven Development or running checks in continuous integration.

Plans and prices

Cucumber.js

Free

Available as an npm module · installed as a development dependency

Cucumber.js (@cucumber/cucumber)

Free

Available as an npm module · install as a development dependency

Every plan, in full

On the record

Audience
The project says thousands of companies rely on Cucumber tests to validate their software.cucumber.io · read 4 Oct 2026
BDD
Cucumber supports Behaviour-Driven Development, a process built around discovery, collaboration and examples.cucumber.io · read 4 Oct 2026
CI integration
Cucumber can be run in continuous integration, and Cucumber Reports can include links to detected Git commits and CI runs.reports.cucumber.io · read 4 Oct 2026
Command line
Cucumber.js includes an executable for running feature files from the command line.cucumber.io · read 4 Oct 2026
Expressions
Step definitions can use Cucumber Expressions or regular expressions, but the two syntaxes cannot be mixed in one expression.cucumber.io · read 4 Oct 2026
Gherkin
Cucumber scenarios use Gherkin syntax, and feature files are typically stored in source control alongside the software.cucumber.io · read 4 Oct 2026
Global install limitation
Cucumber does not work when installed globally because globally installed modules cannot be imported or required in support files.cucumber.io · read 4 Oct 2026
Installation
The documentation shows installing `@cucumber/cucumber` as a development dependency with npm or Yarn.cucumber.io · read 4 Oct 2026
Integrations
Cucumber says it is not a browser automation tool, but works with browser automation tools such as Selenium WebDriver.cucumber.io · read 4 Oct 2026
JavaScript install
Cucumber.js is available as the @cucumber/cucumber npm module and can also be installed with Yarn as a development dependency.cucumber.io · read 4 Oct 2026
Language
Cucumber.js is the JavaScript implementation of Cucumber and is available as an npm module for Node.js.cucumber.io · read 4 Oct 2026
Maintainer status
The project describes @cucumber/cucumber as the stable canonical JavaScript implementation, while @cucumber/node is pre-1.0.0 and may change.cucumber.io · read 4 Oct 2026
Prerequisites
The JavaScript setup instructions require Node.js and either npm or Yarn.cucumber.io · read 4 Oct 2026
Project ownership
Cucumber says its intellectual property assets transitioned from SmartBear Software to the Open Source Collective in December 2024.cucumber.io · read 4 Oct 2026
Purpose
Cucumber reads executable specifications written in plain text and checks whether software conforms to them, reporting success or failure for each scenario.cucumber.io · read 4 Oct 2026
Report data
The Cucumber Reports service states that published report data is stored in US data centers and encrypted at rest.reports.cucumber.io · read 4 Oct 2026
Reporting
Cucumber uses reporter plugins to produce reports showing which scenarios passed or failed, including built-in, separately installed, and custom plugins.cucumber.io · read 4 Oct 2026
Report privacy
Published Cucumber Reports are available at public URLs without authentication and are automatically deleted after at least 24 hours.reports.cucumber.io · read 4 Oct 2026

The review

Cucumber.js is a Node.js implementation of Cucumber that turns readable behavior examples into executable checks. It is best for JavaScript teams practicing Behaviour-Driven Development and willing to maintain a layer of step-definition code. The open-source price is attractive, but project-local installation and browser-automation dependencies shape who will benefit most.

Overview

Cucumber reads plain-text specifications and reports success or failure for each scenario. Teams write those scenarios in Gherkin, usually in .feature files stored beside the application in source control. That shared format can keep product, development and testing conversations anchored to concrete examples, while the executable result provides a repeatable check. The trade-off is maintenance: prose alone does nothing until step definitions connect each step to code that performs the required actions.

Cucumber.js is the stable, canonical JavaScript implementation, distributed as the @cucumber/cucumber npm module for Node.js. The separate @cucumber/node package is pre-1.0.0 and may change, so teams seeking the established implementation should choose the canonical module. Cucumber says thousands of companies rely on its tests, but that adoption does not remove the work of modeling application behavior in definitions.

Key features

Gherkin and definitions

Gherkin gives scenarios a structured plain-text form that remains reviewable outside the test code. Step definitions translate those steps into programming actions. Definitions support either Cucumber Expressions or regular expressions; those syntaxes cannot be mixed within one expression, a constraint worth settling in a team's conventions before a large suite grows.

Command-line and parallel runs

The package includes an executable for running feature files from the command line and supports parallel execution. That makes it practical to place scenario runs in continuous-integration pipelines, where Cucumber can work with Cucumber Reports links to detected Git commits and CI runs. Cucumber is not a browser automation product, however. Browser coverage requires pairing it with tools such as Selenium WebDriver, adding another integration and maintenance boundary.

Reporting and publishing

Reporter plugins produce pass-and-fail scenario reports through built-in, separately installed or custom plugins. Cucumber.js supports publishing to Cucumber Reports with the --publish option from version 7.3.0, while Cucumber-JS 7.0.0 and later supports report publishing generally. Published reports are publicly accessible and deleted after 24 hours. Report data is stored in US data centers and encrypted at rest, so teams should avoid publishing sensitive scenario content and follow Cucumber's guidance not to define secret-bearing environment variables globally.

Pricing

Cucumber.js is free and open source, with no trial because there is no paid tier. The Cucumber.js (@cucumber/cucumber) plan costs nothing and provides the npm module for installation as a development dependency. A similarly named Cucumber.js plan also costs nothing and is installed as a development dependency. Neither plan introduces paid seats or quotas; the meaningful cost is engineering time for definitions, integrations and upkeep.

Installation requires Node.js plus npm or Yarn. The package must be installed locally in the project: Cucumber does not work when installed globally because globally installed modules cannot be imported or required from support files. That requirement is sensible for reproducible builds but rules out a quick machine-wide setup.

Platforms

Cucumber.js runs on Node.js and is available for Linux, macOS and Windows, including self-hosted environments. Its command-line design fits local development and CI servers, while parallel execution can help larger suites reduce elapsed runtime.

Who it's for

Choose Cucumber.js when a JavaScript or Node.js team wants collaborative, example-driven specifications that live with the code and can run in CI. It is particularly suitable when non-test specialists need to read scenarios and when traceable reports matter. Look elsewhere if the priority is a standalone browser automation suite, a non-Node runtime, or a test runner that works without building and maintaining Gherkin step definitions.

Pros and cons

  • Pros: Gherkin scenarios provide a shared, source-controlled language for behavior examples.
  • Pros: Local npm or Yarn installation, command-line execution and parallel runs fit Node.js development and CI.
  • Pros: Reporter plugins and optional Cucumber Reports publishing connect outcomes with CI runs and commits.
  • Cons: Step definitions add an ongoing translation layer between prose and application code.
  • Cons: Global installation is unsupported, so every project needs its own dependency setup.
  • Cons: Published reports are public for up to 24 hours, which requires care with confidential scenario data.
  • Cons: Browser testing needs a separate automation tool rather than being included directly.

Alternatives

For a conventional open-source JavaScript framework distributed through CDN, npm and Yarn across web, mobile and API contexts, consider QUnit instead. Karma is free and broad in platform support, but it is deprecated with no new features or general bug fixes. Intern is a free option created by SitePen and the OpenJS Foundation. Choose uvu for a MIT-licensed runner targeting Node.js and the browser. Web Test Runner focuses on modern web development and browser-oriented tooling. Poku is a free MIT-licensed choice supporting Node.js, Bun and Deno. Pure Test is Apache-2.0 open source with no paid plans stated. Rstest is a free MIT-licensed JavaScript/TypeScript framework available for extension and web environments.

Browse JavaScript Testing Frameworks and Test Automation Software for broader comparisons.

Verdict

Cucumber.js is a strong fit for Node.js teams that want readable, collaborative specifications tied to executable checks and CI reporting. Its decisive advantage is the Gherkin-to-code workflow at no license cost; its decisive drawback is the setup and maintenance burden, plus the need for a separate browser automation tool. Choose it for behavior-focused collaboration, not as a complete, standalone testing platform.

Alternatives to Cucumber.js

Every alternative, ranked