@cucumber/compatibility-kit

中文文档
31.0.0发布于 2026/09/25MIT零依赖构建来源已验证近 30 天下载 6778

Test data used to validate a Cucumber implementation

原始使用文档
文档目录5 节
  1. Overview
  2. Getting Started
  3. The features
  4. The Messages
  5. More info

Cucumber Compatibility Kit

The CCK - aka. Cucumber Compatibility Kit - is a set of features and Messages. It aims to validate an implementation of the Cucumber Messages protocol.

Overview

The kit is composed of features and messages:

  • features, once executed, emit an exhaustive set of Messages as specified by the protocol
  • Messages - serialized as .ndjson files - are the reference: a given feature from the kit, executed using its dedicated step definitions, must emit the corresponding Messages

Getting Started

After running npm install --save-dev @cucumber/compatibility-kit, the kit is available in your node_modules in node_modules/@cucumber/compatibility-kit/features.

You will find there some folders. Each folder owns a feature with its corresponding Messages.

The features

You can execute the features with your implementation. For example with cucumber, it would look like the following:

npx cucumber-js node_modules/@cucumber/compatibility-kit/features/**/*.feature

Here's we have been able to run our features. However it did not find the step definitions. It is up to you to implement your step definitions compatible with your own tool.

In order to make some experiments, the kit comes with step definitions compatible with fake-cucumber and written using TypeScript. You will find also a few assets which may be required for some features. For example, the attachments feature is using an asset cucumber.png to test the possibility to attach images to the Messages.

The Messages

Each feature available in the kit comes with a .ndjson. That file is the expected Messages related the execution of the corresopnding feature. For convenience, the messages are serialized using the ndjson format.

The idea is to execute the features of the kit using your tool, to generate the corresponding messages, and to compare your messages with the ones from the kit.

More info

The Cucumber Compatibility Kit is part of the development tools of Cucumber. It allows us to make sure that all our implementations are properly supporting our internal protocol and thus are compabitle with each other and with our common tools like the html-formatter.

It can be a valuable tool if you are developing integration with cucumber, or your own implementation of it.

Join us on github/cucumber/compatibility-kit to get more help if you need to.

You can also take a look on cucumber-js to see how the kit is used there.

版本与发布记录

@cucumber/compatibility-kit 共发布 68 个版本,首次发布于 2020/01/10;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
31.0.0latest2026/09/251 个月前
30.0.02026/08/063 个月前
29.2.22026/05/126 个月前
29.2.12026/05/116 个月前
29.2.02026/05/116 个月前
29.1.42026/02/248 个月前

关于 @cucumber/compatibility-kit 的常见问题

@cucumber/compatibility-kit 是什么?

Test data used to validate a Cucumber implementation

如何安装 @cucumber/compatibility-kit?

在项目目录运行 npm install @cucumber/compatibility-kit,或使用 pnpm add / yarn add / bun add。

@cucumber/compatibility-kit 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cucumber__compatibility-kit 是否存在。

@cucumber/compatibility-kit 可以商用吗?

@cucumber/compatibility-kit 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cucumber/compatibility-kit 的下载量有多少?

根据 npm 官方下载统计,@cucumber/compatibility-kit 在 2026/10/11 – 2026/11/09 这 30 天内被下载 6,778 次,日均约 226 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cucumber/compatibility-kit 还在维护吗?

最新版本 31.0.0 发布于 2026/09/25(1 个月前);至今共发布 68 个版本,其中过去 12 个月发布了 16 个;首次发布于 2020/01/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。