Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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...
.claude/skills/sickn33-cucumber-skill/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 129% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 34% | 0% |
Use this skill when you need 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...
gherkinFeature: User Login As a registered user I want to log into the application So that I can access my dashboard Background: Given I am on the login page Scenario: Successful login When I enter "user@test.com" in the email field And I enter "password123" in the password field And I click the login button Then I should be redirected to the dashboard And I should see "Welcome" on the page Scenario: Invalid credentials When I enter "wrong@test.com" in the email field And I enter "wrongpass" in the password field And I click the login button Then I should see an error message "Invalid credentials" Scenario Outline: Login with various users When I enter "<email>" in the email field And I enter "<password>" in the password field And I click the login button Then I should see "<result>" Examples: | email | password | result | | admin@test.com | admin123 | Dashboard | | user@test.com | password | Dashboard | | bad@test.com | wrong | Error |
javaimport io.cucumber.java.en.*; import static org.junit.jupiter.api.Assertions.*; public class LoginSteps { private LoginPage loginPage; private DashboardPage dashboardPage; @Given("I am on the login page") public void iAmOnTheLoginPage() { loginPage = new LoginPage(driver); loginPage.navigate(); } @When("I enter {string} in the email field") public void iEnterEmail(String email) { loginPage.enterEmail(email); } @When("I enter {string} in the password field") public void iEnterPassword(String password) { loginPage.enterPassword(password); } @When("I click the login button") public void iClickLogin() { dashboardPage = loginPage.clickLogin(); } @Then("I should be redirected to the dashboard") public void iShouldBeOnDashboard() { assertTrue(driver.getCurrentUrl().contains("/dashboard")); } @Then("I should see {string} on the page") public void iShouldSeeText(String text) { assertTrue(dashboardPage.getPageSource().contains(text)); } }
javascriptconst { Given, When, Then } = require('@cucumber/cucumber'); const { expect } = require('chai'); Given('I am on the login page', async function() { await this.page.goto('/login'); }); When('I enter {string} in the email field', async function(email) { await this.page.fill('#email', email); }); When('I click the login button', async function() { await this.page.click('button[type="submit"]'); }); Then('I should see {string} on the page', async function(text) { const content = await this.page.textContent('body'); expect(content).to.include(text); });
javaimport io.cucumber.java.*; public class Hooks { @Before public void setUp(Scenario scenario) { driver = new ChromeDriver(); } @After public void tearDown(Scenario scenario) { if (scenario.isFailed()) { byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES); scenario.attach(screenshot, "image/png", "failure-screenshot"); } driver.quit(); } }
gherkin@smoke Feature: Login @critical @fast Scenario: Quick login ... @slow @regression Scenario: Full login flow ...
bash# Run by tag mvn test -Dcucumber.filter.tags="@smoke" mvn test -Dcucumber.filter.tags="@smoke and not @slow"
| Bad | Good | Why | |-----|------|-----| | UI details in Gherkin | Business language | Readability | | One step per line of code | Meaningful business steps | Abstraction | | No Background for shared steps | Use Background | DRY | | Imperative steps | Declarative steps | Maintainable |
Set environment variables: LT_USERNAME, LT_ACCESS_KEY
Java:
java// CucumberHooks.java ChromeOptions browserOptions = new ChromeOptions(); HashMap<String, Object> ltOptions = new HashMap<>(); ltOptions.put("user", System.getenv("LT_USERNAME")); ltOptions.put("accessKey", System.getenv("LT_ACCESS_KEY")); ltOptions.put("build", "Cucumber Build"); ltOptions.put("name", scenario.getName()); ltOptions.put("platformName", "Windows 11"); ltOptions.put("video", true); browserOptions.setCapability("LT:Options", ltOptions); driver = new RemoteWebDriver(new URL("https://hub.lambdatest.com/wd/hub"), browserOptions);
JavaScript:
javascriptconst driver = new Builder() .usingServer(`https://${process.env.LT_USERNAME}:${process.env.LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub`) .withCapabilities({ browserName: 'chrome', 'LT:Options': { user: process.env.LT_USERNAME, accessKey: process.env.LT_ACCESS_KEY, build: 'Cucumber Build', platformName: 'Windows 11', video: true }}).build();
| Task | Command | |------|---------| | Run all (Java) | mvn test with cucumber-junit-platform-engine | | Run all (JS) | npx cucumber-js | | Run tagged | --tags "@smoke" | | Dry run | --dry-run | | Generate snippets | Run undefined steps |
reference/playbook.md| § | Section | Lines | |---|---------|-------| | 1 | Project Setup & Configuration | Maven, runner, rerun | | 2 | Feature Writing Patterns | Background, outlines, DataTable | | 3 | Step Definitions | Typed steps, DI injection | | 4 | Dependency Injection & Shared State | PicoContainer, ScenarioContext | | 5 | Hooks (Lifecycle Management) | Before/After ordering, screenshots | | 6 | Custom Parameter Types | Transformers, DocString | | 7 | Parallel Execution | Thread-safe, TestNG parallel | | 8 | Reporting | Allure, masterthought, JSON | | 9 | CI/CD Integration | GitHub Actions, tag matrix | | 10 | Debugging Quick-Reference | 10 common problems | | 11 | Best Practices Checklist | 13 items |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | pass→pass | 9,878 | 8,394 | -15% | 1 | 1 | 0% | 1,968 | 3,479 | +77% | 0 | 0 | — |
case-05 | pass→pass | 5,437 | 2,143 | -61% | 1 | 1 | 0% | 948 | 2,177 | +130% | 0 | 0 | — |
case-01 | fail→pass | 16,143 | 12,239 | -24% | 1 | 1 | 0% | 3,374 | 4,347 | +29% | 0 | 0 | — |
case-02 | pass→pass | 8,471 | 7,175 | -15% | 1 | 1 | 0% | 1,589 | 3,102 | +95% | 0 | 0 | — |
case-03 | fail→pass | 14,000 | 10,375 | -26% | 1 | 1 | 0% | 2,728 | 4,011 | +47% | 0 | 0 | — |
case-04 | pass→pass | 8,806 | 6,474 | -26% | 1 | 1 | 0% | 1,907 | 3,211 | +68% | 0 | 0 | — |
case-07 | pass→pass | 4,121 | 2,821 | -32% | 1 | 1 | 0% | 757 | 2,388 | +215% | 0 | 0 | — |
case-08 | pass→pass | 7,875 | 4,488 | -43% | 1 | 1 | 0% | 1,499 | 2,585 | +72% | 0 | 0 | — |
case-09 | pass→pass | 9,530 | 11,741 | +23% | 1 | 1 | 0% | 2,068 | 4,162 | +101% | 0 | 0 | — |
case-10 | pass→pass | 13,445 | 6,796 | -49% | 1 | 1 | 0% | 2,255 | 3,031 | +34% | 0 | 0 | — |
case-11 | fail→pass | 9,157 | 8,515 | -7% | 1 | 1 | 0% | 1,616 | 3,707 | +129% | 0 | 0 | — |
case-12 | pass→pass | 9,863 | 7,517 | -24% | 1 | 1 | 0% | 1,751 | 3,383 | +93% | 0 | 0 | — |
case-13 | fail→pass | 10,317 | 5,039 | -51% | 1 | 1 | 0% | 2,094 | 2,954 | +41% | 0 | 0 | — |
case-14 | pass→pass | 6,681 | 4,019 | -40% | 1 | 1 | 0% | 1,288 | 2,624 | +104% | 0 | 0 | — |
case-15 | pass→pass | 10,034 | 4,472 | -55% | 1 | 1 | 0% | 1,817 | 2,635 | +45% | 0 | 0 | — |
case-16 | fail→pass | 9,660 | 5,536 | -43% | 1 | 1 | 0% | 2,174 | 2,919 | +34% | 0 | 0 | — |
case-17 | pass→pass | 4,894 | 3,352 | -32% | 1 | 1 | 0% | 889 | 2,402 | +170% | 0 | 0 | — |
case-18 | pass→pass | 2,899 | 3,011 | +4% | 1 | 1 | 0% | 435 | 2,314 | +432% | 0 | 0 | — |
case-19 | pass→pass | 8,289 | 5,364 | -35% | 1 | 1 | 0% | 1,568 | 2,958 | +89% | 0 | 0 | — |
case-20 | pass→pass | 5,539 | 6,291 | +14% | 1 | 1 | 0% | 1,244 | 3,243 | +161% | 0 | 0 | — |
case-21 | pass→pass | 3,210 | 3,536 | +10% | 1 | 1 | 0% | 612 | 2,476 | +305% | 0 | 0 | — |
case-22 | pass→pass | 3,829 | 4,916 | +28% | 1 | 1 | 0% | 856 | 2,815 | +229% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.