Test data for validating compatibility of a Cucumber implementation
The CCK (Cucumber Compatibility Kit) is a set of features and messages. It aims to validate an implementation of the Cucumber Messages protocol.
This kit (package) consists of a set of features, miscellaneous files, and messages:
- Each area will contain one feature, which, once executed, will emit an exhaustive set of messages as specified by the protocol.
- Some of these areas may "also" require miscellaneous files to be used when testing functions such as attaching images or documents or reading data from files.
- Each area will contain a set of messages - serialised as a single
.ndjsonfile.
This is the reference for the CCK: a given feature from the kit, when executed using any dedicated step definitions, must emit the exact corresponding messages.
Available as cucumber-compatibility-kit on PyPI.
pip install cucumber-compatibility-kitThe compatibility kit packages gherkin files within a features/ directory, that can be accessed over a Python interface.
>>> from cucumber_compatibility_kit import CompatibilityKit
>>> cck = CompatibilityKit()
# Access all samples paths containing feature files
>>> cck.gherkin()
[Path('/path/to/features/ambiguous'), ..., Path('/path/to/features/unused-steps')]
# Access the samples path for a feature code
>>> cck.feature_code_for("ambiguous")
Path('/path/to/features/ambiguous')
# Directory contains a feature file
>>> from pathlib import Path
>>> cck.(Path('/path/to/features/ambiguous'))
TrueMore detailed documentation will be defined (#193).
The Cucumber Compatibility Kit is part of the development tools of Cucumber. It helps ensure that all implementations are properly supporting our internal protocol and are compatible (and consistent) with each other and 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 for more help if needed.
You can also take a look at cucumber-ruby to see how the kit is used in Ruby.
Before building this project locally, the samples must be copied from the devkit.
cd ../devkit
npm ci && npm run copy-to:python
cd ../python