# @badeball/cypress-cucumber-preprocessor

> [![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [![Npm package weekly downloads](https://badgen.net/n

Latest version **28.0.0** (published 2026-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @badeball/cypress-cucumber-preprocessor
pnpm add @badeball/cypress-cucumber-preprocessor
yarn add @badeball/cypress-cucumber-preprocessor
bun add @badeball/cypress-cucumber-preprocessor
```

Provides the commands `cucumber-html-formatter`, `cucumber-json-formatter`, `cucumber-merge-messages`.

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 28.0.0 |
| Published | 2026-09-02 |
| First published | 2020-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^20.12.0 \|\| ^21.7.0 \|\| >=22 |
| Dependencies | 24 |
| Unpacked size | 239.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1360 |
| Author | Jonas Amundsen |
| Maintainers | badeball |
| Keywords | cypress, cypress-plugin, cypress-preprocessor |

## Links

- npm: https://www.npmjs.com/package/@badeball/cypress-cucumber-preprocessor
- Repository: https://github.com/badeball/cypress-cucumber-preprocessor
- Issues: https://github.com/badeball/cypress-cucumber-preprocessor/issues
- Funding: https://github.com/sponsors/badeball
- npm.io page: https://npm.io/package/@badeball/cypress-cucumber-preprocessor

## Dependencies (24)

- [glob](https://npm.io/package/glob.md) ^13.0.0
- [uuid](https://npm.io/package/uuid.md) ^14.0.0
- [debug](https://npm.io/package/debug.md) ^4.3.6
- [fp-ts](https://npm.io/package/fp-ts.md) ^2.16.11
- [io-ts](https://npm.io/package/io-ts.md) ^2.2.22
- [mocha](https://npm.io/package/mocha.md) ^11.0.0
- [split](https://npm.io/package/split.md) ^1.0.1
- [base64-js](https://npm.io/package/base64-js.md) ^1.5.1
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.11
- [seedrandom](https://npm.io/package/seedrandom.md) ^3.0.5
- [cosmiconfig](https://npm.io/package/cosmiconfig.md) ^10.0.0
- [@cucumber/gherkin](https://npm.io/package/@cucumber/gherkin.md) ^42.0.0
- [@cucumber/cucumber](https://npm.io/package/@cucumber/cucumber.md) ^13.0.0
- [@cucumber/messages](https://npm.io/package/@cucumber/messages.md) ^34.0.0
- [error-stack-parser](https://npm.io/package/error-stack-parser.md) ^2.1.4
- [find-cypress-specs](https://npm.io/package/find-cypress-specs.md) ^1.45.2
- [common-ancestor-path](https://npm.io/package/common-ancestor-path.md) ^2.0.0
- [@cucumber/ci-environment](https://npm.io/package/@cucumber/ci-environment.md) ^15.0.0
- [@cucumber/html-formatter](https://npm.io/package/@cucumber/html-formatter.md) 24.1.1
- [@cucumber/message-streams](https://npm.io/package/@cucumber/message-streams.md) ^5.0.0
- [@cucumber/tag-expressions](https://npm.io/package/@cucumber/tag-expressions.md) ^11.0.0
- [@jridgewell/trace-mapping](https://npm.io/package/@jridgewell/trace-mapping.md) ^0.3.31
- [@cucumber/pretty-formatter](https://npm.io/package/@cucumber/pretty-formatter.md) ^4.0.0
- [@cucumber/cucumber-expressions](https://npm.io/package/@cucumber/cucumber-expressions.md) ^20.0.0

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 28.0.0 (latest) — 2026-09-02
- 27.0.0 — 2026-08-27
- 26.0.0 — 2026-07-04
- 25.0.0 — 2026-06-28
- 24.0.1 — 2026-02-19
- 24.0.0 — 2025-12-01
- 23.2.1 — 2025-10-09
- 23.2.0 — 2025-09-19
- 23.1.0 — 2025-09-08
- 23.0.0 — 2025-08-21
- 22.2.0 — 2025-06-23
- 22.1.0 — 2025-06-07
- 22.0.1 — 2025-02-09
- 22.0.0 — 2025-01-18
- 21.0.3 — 2024-11-14
- … 98 more at https://npm.io/package/@badeball/cypress-cucumber-preprocessor/versions

## README

# cypress-cucumber-preprocessor

[![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml)
[![Npm package weekly downloads](https://badgen.net/npm/dw/@badeball/cypress-cucumber-preprocessor)](https://npmjs.com/package/@badeball/cypress-cucumber-preprocessor)

<div align="center">

[Quick start](docs/quick-start.md) •
[Documentation](docs/readme.md) •
[Contributing](CONTRIBUTING.md) •
[Sponsors](#attribution--sponsors)

</div>

This preprocessor aims to provide a developer experience and behavior similar to that of [Cucumber](https://cucumber.io/), to Cypress.

> :information_source: The repository has recently moved from `github.com/TheBrainFamily` to `github.com/badeball`. Read more about the transfer of ownership [here](https://github.com/badeball/cypress-cucumber-preprocessor/issues/689).

## Installation

```
$ npm install @badeball/cypress-cucumber-preprocessor
```

## Introduction

The preprocessor (with its dependencies) parses Gherkin documents and allows you to write tests as shown below.

```cucumber
# cypress/e2e/duckduckgo.feature
Feature: duckduckgo.com
  Scenario: visiting the frontpage
    When I visit duckduckgo.com
    Then I should see a search bar
```

```ts
// cypress/e2e/duckduckgo.ts
import { When, Then } from "@badeball/cypress-cucumber-preprocessor";

When("I visit duckduckgo.com", () => {
  cy.visit("https://www.duckduckgo.com");
});

Then("I should see a search bar", () => {
  cy.get("input[type=text]")
    .should("have.attr", "placeholder")
    .and(
      "match",
      /Search without being tracked|Search privately/,
    );
});
```

## Building

Building can be done once using:

```
$ npm run build
```

Or upon file changes with:

```
$ npm run watch
```

There are multiple types of tests, all ran using npm scripts:

```
$ npm run test:fmt
$ npm run test:types
$ npm run test:unit
$ npm run test:integration # make sure to build first
$ npm run test # runs all of the above
```

## Attribution & sponsors

A special thanks goes out to [Łukasz Gandecki](https://github.com/lgandecki) for developing and maintaining the cypress-cucumber integration before me, in addition to [all other contributors](https://github.com/badeball/cypress-cucumber-preprocessor/graphs/contributors). Some of the work has partially been sponsored by [Klaveness Digital](https://www.klavenessdigital.com/). This project is currently sponsored by [TestMu AI](https://www.testmuai.com/?utm_medium=sponsor&utm_source=cypress-cucumber-preprocessor).

<br />
<br />

<p align="center">
  <a href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=cypress-cucumber-preprocessor"><img src="docs/testmu-logo.svg" width="300"></a>
</p>

<br />

---
_Source: https://npm.io/package/@badeball/cypress-cucumber-preprocessor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
