Behavior-Driven Development for R
Overview
Write executable specifications in a natural language that describes how your code should behave. Write specifications in feature files using 'Gherkin' language and execute them using functions implemented in R. Use them as an extension to your 'testthat' tests to provide a high level description of how your code works.
- ✨ Added support for tags and tag expressions. Scenarios can now be tagged with
@tagin feature files and filtered by passingtagstocucumber::test()orcucumber::run(). Feature-level tags are inherited by all scenarios in the feature. - ✨ Added
pending()function to mark steps as pending. A pending step will cause the scenario to be reported as skipped rather than failed. This is useful when writing the feature files before implementing the steps. - ✨ Added step-level reporters.
CucumberReporteris a base class (extendingtestthat::Reporter) withstart_feature()/end_feature()/start_step()/end_step()hooks, andCucumberProgressReporterprints each step as it runs with its realGiven/When/Thenkeyword. Pass one via thereporterargument tocucumber::test()orcucumber::run(). - ✨ Missing step definitions now report a ready-to-paste snippet (with
{int}/{string}placeholders inferred from the step text) instead of just an error. - 🐛 Feature file normalisation now preserves the original
Given/When/Thenkeyword (resolvingAnd/But/*to the preceding one) instead of collapsing every step to a generic keyword. - 🐛 Doc String content is now dedented relative to its opening delimiter, as the Gherkin specification requires. Previously a Doc String whose
"""was indented less than the surrounding nesting lost the indentation of its own lines. #16
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 10 (2 internal)
- Examples that run
- 43%3 run in a plain check · 4 never run
- Exported functions with examples
- 88%
- Documented parameters
- 100%
- Return-value docs
- 38%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 90%
- Median days to close, 50 most recently updated closed issues
- 11
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
13 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/jakubsob/cucumber on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-10-05 · The repository has a site deploy workflow
Show all practicesHide 2 practices
Dependencies
Installing cucumber adds 37 packages (20 with compiled code, 22 MB of source tarballs). Heaviest: stringi 11 MB, fs 1.4 MB, jsonlite 1.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 2.2.0Latest2026-10-05 · current release · diff ↗ ·
added 3 exports
CucumberProgressReporter, CucumberReporter, pending - RR 4.6.0 released · 2026-04-24
- 2.1.12025-07-21 · diff ↗
- 2.1.0
- 2.0.12025-04-26 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 2.0.02025-04-04 · diff ↗
- 1.2.12025-03-20 · diff ↗
- 1.2.02025-02-24 · diff ↗
- 1.1.0
- 1.0.42024-06-29 · diff ↗
- 1.0.32024-06-09 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.0.22024-04-09 · diff ↗
- 1.0.12024-04-03 · diff ↗
- 1.0.02024-03-14
Show 1 earlier eventHide 1 earlier event
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2024-03-14
- Total releases
- 13 / 2 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 117 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("cucumber")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.