cucumber-testing
/cucumber-testing
Configures Cucumber for BDD scenarios - Cucumber-JVM (Java/Kotlin via JUnit 5), Cucumber-JS (Node), Cucumber-Ruby. Authors `.feature` files in Gherkin, writes step definitions in the host language, runs via the framework's runner, integrates with JUnit XML reporting. Use when the user mentions Cucumber, Gherkin, `.feature` files, or behavior-driven (BDD) tests in Java, Kotlin, JavaScript, or Ruby, as the canonical wrapper for any of the three official implementations.
- Author
- testland ↗
- Repository
- qa ↗
- Licence
- MIT
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 24
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Configures Cucumber for BDD scenarios - Cucumber-JVM (Java/Kotlin via JUnit 5), Cucumber-JS (Node), Cucumber-Ruby. Authors `.feature` files in Gherkin, writes step definitions in the host language, runs via the framework's runner, integrates with JUnit XML reporting. Use when the user mentions Cucumber, Gherkin, `.feature` files, or behavior-driven (BDD) tests in Java, Kotlin, JavaScript, or Ruby, as the canonical wrapper for any of the three official implementations.
Original author description
Configures Cucumber for BDD scenarios - Cucumber-JVM (Java/Kotlin via JUnit 5), Cucumber-JS (Node), Cucumber-Ruby. Authors `.feature` files in Gherkin, writes step definitions in the host language, runs via the framework's runner, integrates with JUnit XML reporting. Use when the user mentions Cucumber, Gherkin, `.feature` files, or behavior-driven (BDD) tests in Java, Kotlin, JavaScript, or Ruby, as the canonical wrapper for any of the three official implementations.
How it works
- Overview
- When to use
- Step 1 - Install (Cucumber-JVM)
- Step 2 - Install (Cucumber-JS)
- Step 3 - Install (Cucumber-Ruby)
- Step 4 - Author a Feature
- Step 5 - Write step definitions
- Step 6 - Run
- Step 7 - Reporting
- Step 8 - Tags + filtering
SKILL.md preview
---
name: cucumber-testing
description: "Configures Cucumber for BDD scenarios - Cucumber-JVM (Java/Kotlin via JUnit 5), Cucumber-JS (Node), Cucumber-Ruby. Authors `.feature` files in Gherkin, writes step definitions in the host language, runs via the framework's runner, integrates with JUnit XML reporting. Use when the user mentions Cucumber, Gherkin, `.feature` files, or behavior-driven (BDD) tests in Java, Kotlin, JavaScript, or Ruby, as the canonical wrapper for any of the three official implementations."
---
# cucumber-testing
## Overview
Per [cucumber-install][ci]:
[ci]: https://cucumber.io/docs/installation/
> "Cucumber is available for most mainstream programming
> languages."
Cucumber implementations split into tiers ([cucumber-install][ci]):
> - **Official**: Hosted under the main Cucumber organization
> (JavaScript, Java, Ruby, Android, Kotlin, Scala, C++)
> - **Semi-official**: Developed elsewhere but use Cucumber
> components (PHP's Behat, Python's Behave, .NET's Reqnroll)
This skill covers the three most-used official implementations:
**Cucumber-JVM** (Java + Kotlin), **Cucumber-JS** (Node), and
**Cucumber-Ruby**. For Python, see
`behave-testing`. For .NET, see
`reqnroll-testing`.
## When to use
- The team uses BDD with Gherkin features.
- Cross-stakeholder collaboration is the value (Gherkin scenarios
read by non-engineers).
- Acceptance criteria authored as Gherkin scenarios per
`gherkin-from-stories`.
If only engineers will read the tests, BDD's collaboration value
is wasted - plain xUnit-style tests are simpler. Not sure which
runner fits the repo, or whether BDD is worth adopting at all? See
[references/runner-selection.md](references/runner-selection.md) -
the runner decision table, per-runner first-run commands, the
SpecFlow end-of-life note, and the "when BDD is not worth it" test.
## Step 1 - Install (Cucumber-JVM)
Maven:
```xml
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.20.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
<version>7.20.0</version>
<scope>test</scope>
</dependency>
```
For Kotlin: replace `cucumber-java` with `cucumber-kotlin`.
## Step 2 - Install (Cucumber-JS)
```bash
npm install --save-dev @cucumber/cucumber
```
## Step 3 - Install (Cucumber-Ruby)
```bash
gem install cucumber
# Or in Gemfile:
group :test do
gem 'cucumber-ruby'
end
```
## Step 4 - Author a Feature
```gherkin
# features/cart.feature
Feature: Apply promo code at checkout
Background:
Given a logged-in user with email confirmed
And the cart contains 1 of "BOOK-001" at $24.99
Scenario: Apply valid promo
When I enter "WELCOME10" in the promo input
And I click "Apply"
Then the subtotal updates to $22.49
And a confirmation toast appears
Scenario Outline: Promo validation rejects bad codes
When I enter "<code>" in the promo input
And I click "Apply"
Then an error appears: "<error>"
Examples:
| code | error |
| EXPIRED50 | This code has expired |
| NOTREAL | Code not found |
| "" (empty) | Please enter a code |
```
## Step 5 - Write step definitions
Bind each Gherkin line to a method with a `{cucumber-expression}` capture.
Minimal JS example:
```javascript
const { Given, When, Then } = require('@cucumber/cucumber');
Given('a logged-in user with email confirmed', function() {
this.page = new CheckoutPage(createLoggedInUser());
});
When('I enter {string} in the promo input', function(code) {
this.page.enterPromo(code);
});
Then('the subtotal updates to ${float}', function(expected) {
assert.equal(this.page.getSubtotal(), expected);
});
```
Full Java (Cucumber-JVM) and JS step definitions, plus the JUnit XML reporting
config, are in
[references/step-definitions-and-reporting.md](references/step-definitions-and-reporting.md).
## Step 6 - Run
JVM (via Maven):
```bash
mvn test
# Or specific feature:
mvn test -Dcucumber.features=features/cart.feature
```
JS:
```bash
npx cucumber-js features/
```
Ruby:
```bash
cucumber features/
```
## Step 7 - Reporting
Cucumber outputs multiple formats; JUnit XML is the CI-canonical one and feeds
`junit-xml-analysis` (in the qa-test-reporting plugin). The JVM
(`cucumber.properties`) and JS (CLI) reporting config is in
[references/step-definitions-and-reporting.md](references/step-definitions-and-reporting.md).
## Step 8 - Tags + filtering
```gherkin
@regression @critical
Scenario: Apply valid promo
...
```
```bash
# Run only critical tests
npx cucumber-js features/ --tags '@critical'
# Skip @wip
npx cucumber-js features/ --tags 'not @wip'
```
## Anti-patterns
| Anti-pattern | Why it fails | Fix |
|-----------------------------------------------------------------------|---------------------------------------------------------------------------|-----|
| Imperative steps ("I click button id=#submit") | Couples to implementation; scenarios become fragile. | Declarative steps ("I submit the form"). |
| 100 unique step definitions | Drift; inconsistency. | Step library curation (see `bdd-step-library-curator`). |
| BDD without business stakeholder involvement | Defeats the point; expensive xUnit tests. | If non-engineers don't read the features, switch to plain unit tests. |
| Mixing Cucumber + plain JUnit assertions | Two test runners; double maintenance. | Cucumber's runner only; plain JUnit for non-BDD tests in separate suite. |
| Skipping `Background` for shared setup | Repeated Given lines clutter scenarios. | Background block (Step 4 example). |
## Limitations
- **Step ambiguity.** Two step definitions matching the same
Gherkin line cause runtime errors; the framework reports
ambiguous steps but only at runtime.
- **Per-language quirks.** Cucumber-JVM's regex syntax differs
from Cucumber-JS's; copy-paste between languages doesn't work.
- **Performance.** BDD adds runner overhead vs plain xUnit;
acceptable for <500-test suites, slow beyond.
- **Step-definition discoverability.** Without IDE plugin, finding
the implementation behind a Gherkin line is manual grep.
## References
- [ci][ci] - Cucumber installation: official + semi-official + unofficial
implementation tiers; recommendation to match production language.
- `behave-testing` - Python sibling.
- `reqnroll-testing` - .NET sibling.
- `bdd-step-library-curator` - addresses step proliferation.
- `gherkin-from-stories` - upstream skill that generates Gherkin from stories, AC lists, manual steps, and raw specs.
- [references/runner-selection.md](references/runner-selection.md) - runner decision table + first-run commands.
Files in this package (24)
- SKILL.md 7 KB
- .tessl-plugin/plugin.json 1 KB
- evals/billing-change-broke-checkout-scenarios/criteria.json 5 KB
- evals/billing-change-broke-checkout-scenarios/task.md 6 KB
- evals/bulk-price-import-has-no-coverage/criteria.json 5 KB
- evals/bulk-price-import-has-no-coverage/task.md 4 KB
- evals/cart-state-leaks-between-scenarios/criteria.json 4 KB
- evals/cart-state-leaks-between-scenarios/task.md 4 KB
- evals/every-pull-request-runs-the-whole-suite/criteria.json 4 KB
- evals/every-pull-request-runs-the-whole-suite/task.md 6 KB
- evals/gherkin-everything-mandate/criteria.json 4 KB
- evals/gherkin-everything-mandate/task.md 5 KB
- evals/green-pipeline-hid-unwired-steps/criteria.json 4 KB
- evals/green-pipeline-hid-unwired-steps/task.md 6 KB
- evals/maven-build-never-runs-the-feature/criteria.json 5 KB
- evals/maven-build-never-runs-the-feature/task.md 6 KB
- evals/money-parsing-repeated-in-every-step/criteria.json 4 KB
- evals/money-parsing-repeated-in-every-step/task.md 5 KB
- evals/orders-feature-repeats-its-setup/criteria.json 5 KB
- evals/orders-feature-repeats-its-setup/task.md 7 KB
- evals/promo-rejection-cases-copy-pasted/criteria.json 5 KB
- evals/promo-rejection-cases-copy-pasted/task.md 5 KB
- references/runner-selection.md 6 KB
- references/step-definitions-and-reporting.md 2 KB
Versions
The database has no other skills named cucumber-testing.
Database snapshot: 13.11.2026 · package version b659673ead1e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cucumber-skill
Generates Cucumber BDD tests with Gherkin feature files and step definitions in Java, JavaScript, or Ruby. Use when user mentions \"Cucumber\", \"Gherkin\", \"Feature/Scenario\", \"Given/When/Then\", \"BDD\". - 100cucumber-skill
Generates Cucumber BDD tests with Gherkin feature files and step definitions in Java, JavaScript, or Ruby. Use when user mentions \"Cucumber\", \"Gherkin\", \"Feature/Scenario\", \"Given/When/Then\", \"BDD\". - 95cucumber-skill
Generates Cucumber BDD tests with Gherkin feature files and step definitions in Java, JavaScript, or Ruby. Use when user mentions "Cucumber", "Gherkin", "Feature/Scenario", "Given/When/Then", "BDD". Triggers on: "Cucumber", "Gherkin", "BDD", "Feature file", "Given/When/Then", "step definitions". - 100cucumber
Cucumber runs behavior-driven (BDD) tests written as plain-language Gherkin feature files and matches each Given/When/Then step to code. Use when the user wants to write feature files, implement step definitions in JavaScript or TypeScript with cucumber-js, share state through a… - 100cucumber-gherkin
When the user wants to design, implement, debug, or evolve BDD scenarios using Cucumber and the Gherkin syntax across any language (Java, JS, Ruby, JVM, etc.). Use when the user mentions "Cucumber," "Gherkin," "Given/When/Then," ".feature file," "step definitions," "scenario… - 100cucumber-gherkin
BDD testing with Cucumber and Gherkin for Ruby and Rails applications. Use when writing feature files (.feature), step definitions, hooks, or implementing Behaviour-Driven Development in Ruby/Rails projects. Covers Gherkin keywords (Feature, Scenario, Given/When/Then,…