Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Cucumber.js

cucumber.io

  • Free plan
  • Windows
  • macOS
  • Linux
  • Self-hosted
7.9 Club score Visit cucumber.io

What Cucumber.js is

Cucumber.js is the JavaScript implementation of Cucumber, a free 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 JavaScript code that performs the described action. The command-line executable runs feature files and reports whether scenarios pass or fail. Reporter plugins can produce scenario reports, and Cucumber.js can run in continuous integration and support parallel execution. The project supports Behaviour-Driven Development, which centres on discovery, collaboration, and examples. Cucumber.js is available as the `@cucumber/cucumber` npm module and should be installed as a development dependency with npm or Yarn; setup requires Node.js. It can publish reports with `--publish`, but published reports are publicly accessible and deleted after 24 hours. The project says published report data is stored in US data centers and encrypted at rest. Cucumber.js works with browser automation tools such as Selenium WebDriver, but it is not itself a browser automation tool.

Who it suits

Cucumber.js suits JavaScript teams using Gherkin scenarios to define and check software behaviour, including teams running checks in continuous integration. It can work alongside browser automation tools when those are part of the workflow.

Good to know, and what to watch

  • Runs Gherkin feature files from the command line.
  • Supports parallel execution.
  • Reporter plugins show scenario outcomes.
  • Can run in continuous integration.
  • 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.

Cucumber.js

Free

Cucumber.js (@cucumber/cucumber)

Free

Open source

Getting started

  1. Install Node.js
  2. Choose npm or Yarn
  3. Install `@cucumber/cucumber` as a development dependency
  4. Write scenarios in Gherkin `.feature` files
  5. Create step definitions that connect steps to code
  6. Run feature files with the Cucumber.js command-line executable

The Club's review

Cucumber.js turns plain-language Gherkin scenarios into executable checks for JavaScript projects. It is most suitable for teams practising Behaviour-Driven Development who want product examples, code and CI results connected. The main trade-off is that every readable step still needs maintained JavaScript definitions, and browser interaction requires a separate automation tool.

Overview

Cucumber evaluates executable specifications and reports success or failure for each scenario. Scenarios normally live in .feature files under source control beside the software, so the examples discussed by product and engineering can become repeatable checks. That shared format is useful when collaboration and discovery matter, but it adds a translation layer: step definitions must implement the actions described in each sentence.

Cucumber.js is the stable, canonical JavaScript implementation, published as the @cucumber/cucumber npm module for Node.js. The project identifies @cucumber/node as pre-1.0.0 and liable to change, making the canonical package the sensible choice for production work.

Key features

Gherkin and step definitions

Gherkin provides structured plain text for scenarios, while step definitions connect each step to program code. Definitions may use Cucumber Expressions or regular expressions, although both syntaxes cannot be combined within one expression. This gives teams flexibility in matching steps, but inconsistent conventions can make a large definition library harder to maintain.

Command-line and parallel runs

The package supplies an executable for running feature files from the command line and supports parallel execution. That suits continuous-integration pipelines where suites need repeatable command-line entry points and shorter overall runtime. Node.js is the supported runtime; JavaScript setup requires Node.js plus npm or Yarn.

Reports and CI

Reporter plugins produce results showing which scenarios passed or failed, using built-in, separately installed or custom plugins. Cucumber-JS 7.0.0 and later can publish to Cucumber Reports, and publishing with --publish is supported from version 7.3.0. Published reports are publicly accessible and deleted after 24 hours, so teams must avoid exposing sensitive scenario content. Report data is stored in US data centres and encrypted at rest. Reports can include links to detected Git commits and CI runs, which helps connect failures to delivery history.

Tool boundaries and security

Cucumber is not browser automation software. It can work with tools such as Selenium WebDriver, but that integration is an additional part of the test stack. Cucumber also advises against defining environment variables containing secrets globally. A published security policy explains how to contact maintainers, while community support is available through Discord, GitHub Discussions and Stack Overflow.

Pricing

Cucumber.js is open-source software with no paid tier, seat charge or free-trial period. The listed plans are both free at no cost: Cucumber.js (@cucumber/cucumber) is installed as an npm development dependency, and Cucumber.js is likewise available as a development dependency. Install locally with npm or Yarn; global installation does not work because globally installed modules cannot be imported or required from support files. The zero price removes licensing barriers, while teams must still budget for implementation, maintenance and any browser-automation tooling they add.

Platforms

Cucumber.js runs on Node.js across Linux, macOS and Windows, and supports self-hosted deployments. Parallel execution is supported, making it practical for CI environments that can distribute scenario work.

Who it's for

Choose Cucumber.js when JavaScript teams want business-readable examples to drive collaborative discovery and then run as automated acceptance checks. It is a strong fit for organisations willing to maintain a step-definition layer and integrate results into CI. It is less suitable when the priority is a browser-focused runner out of the box, or when a team wants tests written only as direct JavaScript assertions without Gherkin.

Pros and cons

  • Pro: Gherkin feature files give non-specialists and developers a common format for discussing expected behaviour.
  • Pro: Local npm or Yarn installation, command-line execution and parallel runs fit standard Node.js and CI workflows.
  • Pro: Pluggable pass/fail reporting and Git/CI links help trace scenario outcomes through delivery.
  • Con: Step definitions require ongoing code and convention maintenance; scenarios do not test anything until those definitions are implemented.
  • Con: It does not automate browsers itself, so browser coverage brings another tool and another integration boundary.
  • Con: The publish option exposes reports publicly for up to 24 hours, requiring care with confidential scenarios and secrets.

Alternatives

See the JavaScript Testing Frameworks and Test Automation Software lists for broader comparisons.

  • Karma is a free, MIT-licensed open-source option for browser-oriented environments, but it is deprecated and receives no new features or general bug fixes.
  • Web Test Runner is a free open-source choice from Modern Web for developers seeking modern web-development tools that work closely with the browser.
  • QUnit is a free open-source JavaScript testing framework distributed through CDN, npm and Yarn.
  • Vitest is a free, open-source option for Linux, macOS and web projects, with no stated plan limits.
  • Pure Test is free Apache-2.0 open-source software with no paid plans stated.
  • Testem is a free MIT-licensed open-source JavaScript test runner for Linux, macOS and Windows.
  • Jasmine is a free JavaScript testing option with no stated pricing or usage limits.
  • Rstest is a free, MIT-licensed JavaScript/TypeScript testing framework for extension and web environments.

Verdict

Cucumber.js is the right choice for JavaScript teams that want collaborative Gherkin examples to become executable, CI-visible behaviour checks without licensing cost. Choose it for the shared specification model and extensible reporting; look elsewhere if you need built-in browser automation or want to avoid maintaining step definitions.

The verdict

Cucumber.js gives teams a way to connect readable Gherkin scenarios with JavaScript actions and scenario results. Install it locally as a development dependency, and consider the public nature of published reports before using that option.

Questions people ask

Is Cucumber.js free?

Yes. Cucumber.js is listed as free and open source, with plans shown at no cost.

Which platforms support Cucumber.js?

It supports Linux, macOS, Windows and self-hosted environments, running on Node.js.

Can Cucumber.js publish reports?

Yes. Cucumber-JS version 7.0.0 and above supports publishing to Cucumber Reports, and `--publish` is supported from version 7.3.0. Published reports are public and deleted after 24 hours.

Can it automate browsers?

Cucumber.js is not a browser automation tool. It works with browser automation tools such as Selenium WebDriver.

How is it installed?

Install the `@cucumber/cucumber` npm module as a development dependency with npm or Yarn. Global installation does not work because globally installed modules cannot be imported or required in support files.

What the maker publishes

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

Checked against the maker's pages on 4 Oct 2026.