Cucumber

Implements Behavior-Driven Development with Cucumber, Gherkin scenarios, and step definitions.

ssrjkk Updated 2 repo stars

File contents

Cucumber

BDD testing with Gherkin scenarios and step definitions.

Quick Start

Feature: User Login
  Scenario: Successful login
    Given I am on the login page
    When I enter "user@example.com" as email
    And I enter "password123" as password
    And I click "Sign In"
    Then I should see the dashboard

Step Definitions

const { Given, When, Then } = require('@cucumber/cucumber')
Given('I am on the login page', async function () { await this.page.goto('https://example.com/login') })
Then('I should see the dashboard', async function () { await expect(this.page.locator('#dashboard')).toBeVisible() })

When to Use

  • Business-readable tests; ATDD; Cross-team communication; Living documentation

Validation

  1. Features parse without errors; 2. All scenarios pass; 3. Reports with pass/fail status

ssrjkk/claude-skills/tree/main/.claude/skills/qa/cucumber commit c43cf15cf3

Frequently asked questions

npx skillmds@latest add ssrjkk/cucumber