[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D82RD7DKF9AFVWN0DJQ22C":3,"skill-same:01M7D82RD7DKF9AFVWN0DJQ22C":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":14,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M7D82RD7DKF9AFVWN0DJQ22C","BDD\u002FCucumber Patterns",null,"Behavior-Driven Development skill using Cucumber, covering feature files, step definitions, Gherkin best practices, data tables, scenario outlines, and hooks.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fbdd-cucumber\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: BDD\u002FCucumber Patterns\ndescription: Behavior-Driven Development skill using Cucumber, covering feature files, step definitions, Gherkin best practices, data tables, scenario outlines, and hooks.\nversion: 1.0.0\nauthor: thetestingacademy\nlicense: MIT\ntags: [bdd, cucumber, gherkin, feature-files, step-definitions, behavior-driven]\ntestingTypes: [bdd, e2e]\nframeworks: [cucumber]\nlanguages: [typescript, java]\ndomains: [web, api]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# BDD\u002FCucumber Patterns Skill\n\nYou are an expert QA engineer specializing in Behavior-Driven Development (BDD) with Cucumber. When the user asks you to write, review, or improve Cucumber feature files and step definitions, follow these detailed instructions.\n\n## Core Principles\n\n1. **Business language** -- Feature files must use domain language that non-technical stakeholders understand.\n2. **Declarative over imperative** -- Describe what the user does, not how the UI works.\n3. **Single scenario, single behavior** -- Each scenario tests exactly one business rule.\n4. **Reusable step definitions** -- Steps should be generic enough to reuse across features.\n5. **Living documentation** -- Feature files are the single source of truth for behavior.\n\n## Project Structure (TypeScript)\n\n```\nfeatures\u002F\n  auth\u002F\n    login.feature\n    registration.feature\n    password-reset.feature\n  products\u002F\n    product-listing.feature\n    product-search.feature\n  checkout\u002F\n    cart.feature\n    payment.feature\n  step-definitions\u002F\n    auth.steps.ts\n    products.steps.ts\n    checkout.steps.ts\n    common.steps.ts\n  support\u002F\n    world.ts\n    hooks.ts\n    custom-parameter-types.ts\n  pages\u002F\n    login.page.ts\n    products.page.ts\ncucumber.js\ntsconfig.json\n```\n\n## Project Structure (Java)\n\n```\nsrc\u002F\n  test\u002F\n    java\u002Fcom\u002Fexample\u002F\n      steps\u002F\n        AuthSteps.java\n        ProductSteps.java\n        CommonSteps.java\n      pages\u002F\n        LoginPage.java\n        ProductsPage.java\n      hooks\u002F\n        Hooks.java\n      runners\u002F\n        TestRunner.java\n    resources\u002F\n      features\u002F\n        auth\u002F\n          login.feature\n          registration.feature\n        products\u002F\n          product-listing.feature\n```\n\n## Writing Feature Files\n\n### Good Feature File\n\n```gherkin\nFeature: User Login\n  As a registered user\n  I want to log into the application\n  So that I can access my personalized dashboard\n\n  Background:\n    Given the login page is displayed\n\n  @smoke @auth\n  Scenario: Successful login with valid credentials\n    When I log in with valid credentials\n    Then I should see the dashboard\n    And I should see a welcome message\n\n  @auth @negative\n  Scenario: Login fails with incorrect password\n    When I log in with an incorrect password\n    Then I should see an error message \"Invalid email or password\"\n    And I should remain on the login page\n\n  @auth @negative\n  Scenario: Login fails with non-existent email\n    When I log in with a non-registered email\n    Then I should see an error message \"Invalid email or password\"\n\n  @auth @security\n  Scenario: Account locks after multiple failed attempts\n    When I attempt to log in 5 times with incorrect passwords\n    Then my account should be temporarily locked\n    And I should see a message about account lockout\n```\n\n### Scenario Outline (Data-Driven)\n\n```gherkin\nFeature: Form Validation\n  As a user\n  I want to see clear validation messages\n  So that I can correct my input\n\n  @validation\n  Scenario Outline: Email validation\n    Given I am on the registration page\n    When I enter \"\u003Cemail>\" in the email field\n    And I submit the form\n    Then I should see the validation message \"\u003Cmessage>\"\n\n    Examples:\n      | email               | message                     |\n      |                     | Email is required           |\n      | not-an-email        | Please enter a valid email  |\n      | @missing.com        | Please enter a valid email  |\n      | valid@example.com   |                             |\n\n  @validation\n  Scenario Outline: Password strength validation\n    Given I am on the registration page\n    When I enter \"\u003Cpassword>\" in the password field\n    And I move to the next field\n    Then the password strength indicator should show \"\u003Cstrength>\"\n\n    Examples:\n      | password        | strength |\n      | abc             | weak     |\n      | abcdef12        | medium   |\n      | SecurePass123!  | strong   |\n```\n\n### Data Tables\n\n```gherkin\nScenario: Create multiple users\n  Given the following users exist:\n    | email               | name       | role   |\n    | admin@example.com   | Admin User | admin  |\n    | user1@example.com   | User One   | user   |\n    | user2@example.com   | User Two   | viewer |\n  When I navigate to the user management page\n  Then I should see 3 users in the list\n\nScenario: Verify user profile details\n  Given I am logged in as \"admin@example.com\"\n  When I view my profile\n  Then my profile should contain:\n    | Field    | Value              |\n    | Name     | Admin User         |\n    | Email    | admin@example.com  |\n    | Role     | Administrator      |\n\nScenario: Add items to cart\n  When I add the following items to my cart:\n    | product     | quantity | price  |\n    | Widget A    | 2        | 29.99  |\n    | Widget B    | 1        | 49.99  |\n  Then my cart total should be \"$109.97\"\n```\n\n## Step Definitions (TypeScript)\n\n```typescript\n\u002F\u002F step-definitions\u002Fauth.steps.ts\nimport { Given, When, Then } from '@cucumber\u002Fcucumber';\nimport { expect } from '@playwright\u002Ftest';\nimport { CustomWorld } from '..\u002Fsupport\u002Fworld';\n\nGiven('the login page is displayed', async function (this: CustomWorld) {\n  await this.page.goto('\u002Flogin');\n  await expect(this.page.getByRole('heading', { name: 'Sign In' })).toBeVisible();\n});\n\nWhen('I log in with valid credentials', async function (this: CustomWorld) {\n  await this.loginPage.login('user@example.com', 'SecurePass123!');\n});\n\nWhen('I log in with an incorrect password', async function (this: CustomWorld) {\n  await this.loginPage.login('user@example.com', 'wrongpassword');\n});\n\nWhen('I log in with a non-registered email', async function (this: CustomWorld) {\n  await this.loginPage.login('nonexistent@example.com', 'SomePass123!');\n});\n\nThen('I should see the dashboard', async function (this: CustomWorld) {\n  await expect(this.page).toHaveURL(\u002F\\\u002Fdashboard\u002F);\n});\n\nThen('I should see a welcome message', async function (this: CustomWorld) {\n  await expect(this.page.getByText(\u002Fwelcome\u002Fi)).toBeVisible();\n});\n\nThen('I should see an error message {string}', async function (this: CustomWorld, message: string) {\n  await expect(this.page.getByRole('alert')).toHaveText(message);\n});\n\nThen('I should remain on the login page', async function (this: CustomWorld) {\n  await expect(this.page).toHaveURL(\u002F\\\u002Flogin\u002F);\n});\n\nWhen('I attempt to log in {int} times with incorrect passwords', async function (\n  this: CustomWorld,\n  attempts: number\n) {\n  for (let i = 0; i \u003C attempts; i++) {\n    await this.loginPage.login('user@example.com', `wrong${i}`);\n  }\n});\n\nThen('my account should be temporarily locked', async function (this: CustomWorld) {\n  await expect(this.page.getByText(\u002Flocked\u002Fi)).toBeVisible();\n});\n```\n\n### Step Definitions with Data Tables\n\n```typescript\n\u002F\u002F step-definitions\u002Fcommon.steps.ts\nimport { Given, When, Then, DataTable } from '@cucumber\u002Fcucumber';\nimport { CustomWorld } from '..\u002Fsupport\u002Fworld';\n\nGiven('the following users exist:', async function (this: CustomWorld, dataTable: DataTable) {\n  const users = dataTable.hashes();\n  for (const user of users) {\n    await this.apiClient.post('\u002Fapi\u002Fusers', {\n      email: user.email,\n      name: user.name,\n      role: user.role,\n      password: 'DefaultPass123!',\n    });\n  }\n});\n\nThen('my profile should contain:', async function (this: CustomWorld, dataTable: DataTable) {\n  const expectedData = dataTable.rowsHash();\n  for (const [field, value] of Object.entries(expectedData)) {\n    const element = this.page.getByLabel(field);\n    await expect(element).toHaveValue(value as string);\n  }\n});\n\nWhen('I add the following items to my cart:', async function (this: CustomWorld, dataTable: DataTable) {\n  const items = dataTable.hashes();\n  for (const item of items) {\n    await this.page.getByText(item.product).click();\n    await this.page.getByLabel('Quantity').fill(item.quantity);\n    await this.page.getByRole('button', { name: 'Add to Cart' }).click();\n  }\n});\n```\n\n## Step Definitions (Java)\n\n```java\npackage com.example.steps;\n\nimport io.cucumber.java.en.*;\nimport io.cucumber.datatable.DataTable;\nimport static org.assertj.core.api.Assertions.*;\nimport java.util.List;\nimport java.util.Map;\n\npublic class AuthSteps {\n    private final LoginPage loginPage;\n    private final DashboardPage dashboardPage;\n\n    public AuthSteps() {\n        this.loginPage = new LoginPage(DriverFactory.getDriver());\n        this.dashboardPage = new DashboardPage(DriverFactory.getDriver());\n    }\n\n    @Given(\"the login page is displayed\")\n    public void theLoginPageIsDisplayed() {\n        loginPage.navigate();\n        assertThat(loginPage.isDisplayed()).isTrue();\n    }\n\n    @When(\"I log in with valid credentials\")\n    public void iLogInWithValidCredentials() {\n        loginPage.loginAs(\"user@example.com\", \"SecurePass123!\");\n    }\n\n    @When(\"I log in with an incorrect password\")\n    public void iLogInWithIncorrectPassword() {\n        loginPage.loginAs(\"user@example.com\", \"wrongpassword\");\n    }\n\n    @Then(\"I should see the dashboard\")\n    public void iShouldSeeTheDashboard() {\n        assertThat(dashboardPage.isDisplayed()).isTrue();\n    }\n\n    @Then(\"I should see an error message {string}\")\n    public void iShouldSeeAnErrorMessage(String expectedMessage) {\n        assertThat(loginPage.getErrorMessage()).isEqualTo(expectedMessage);\n    }\n\n    @Given(\"the following users exist:\")\n    public void theFollowingUsersExist(DataTable dataTable) {\n        List\u003CMap\u003CString, String>> users = dataTable.asMaps();\n        for (Map\u003CString, String> user : users) {\n            apiClient.createUser(\n                user.get(\"email\"),\n                user.get(\"name\"),\n                user.get(\"role\")\n            );\n        }\n    }\n}\n```\n\n## World and Hooks\n\n### Custom World (TypeScript)\n\n```typescript\n\u002F\u002F support\u002Fworld.ts\nimport { World, IWorldOptions, setWorldConstructor } from '@cucumber\u002Fcucumber';\nimport { Browser, Page, chromium } from '@playwright\u002Ftest';\nimport { LoginPage } from '..\u002Fpages\u002Flogin.page';\n\nexport class CustomWorld extends World {\n  browser!: Browser;\n  page!: Page;\n  loginPage!: LoginPage;\n  apiClient: any;\n  testData: Map\u003Cstring, any> = new Map();\n\n  constructor(options: IWorldOptions) {\n    super(options);\n  }\n\n  async init() {\n    this.browser = await chromium.launch({ headless: true });\n    const context = await this.browser.newContext();\n    this.page = await context.newPage();\n    this.loginPage = new LoginPage(this.page);\n  }\n\n  async cleanup() {\n    await this.page?.close();\n    await this.browser?.close();\n  }\n}\n\nsetWorldConstructor(CustomWorld);\n```\n\n### Hooks\n\n```typescript\n\u002F\u002F support\u002Fhooks.ts\nimport { Before, After, BeforeAll, AfterAll, BeforeStep, AfterStep, Status } from '@cucumber\u002Fcucumber';\nimport { CustomWorld } from '.\u002Fworld';\n\nBefore(async function (this: CustomWorld) {\n  await this.init();\n});\n\nAfter(async function (this: CustomWorld, scenario) {\n  if (scenario.result?.status === Status.FAILED) {\n    const screenshot = await this.page.screenshot();\n    this.attach(screenshot, 'image\u002Fpng');\n    console.log(`Scenario failed: ${scenario.pickle.name}`);\n  }\n  await this.cleanup();\n});\n\nBefore({ tags: '@auth' }, async function (this: CustomWorld) {\n  \u002F\u002F Set up authentication state for auth-tagged scenarios\n  await this.apiClient?.login('admin@example.com', 'AdminPass123!');\n});\n\nAfter({ tags: '@cleanup' }, async function (this: CustomWorld) {\n  \u002F\u002F Clean up test data created during the scenario\n  for (const [key, value] of this.testData.entries()) {\n    await this.apiClient?.delete(`\u002Fapi\u002F${key}\u002F${value}`);\n  }\n});\n```\n\n## Gherkin Best Practices\n\n### Declarative vs Imperative\n\n```gherkin\n# BAD -- Imperative (too detailed, UI-coupled)\nScenario: Login\n  Given I navigate to \"https:\u002F\u002Fexample.com\u002Flogin\"\n  When I click on the email field\n  And I type \"user@example.com\" in the email field\n  And I click on the password field\n  And I type \"SecurePass123!\" in the password field\n  And I click the \"Sign In\" button\n  Then I should be redirected to \"\u002Fdashboard\"\n  And the h1 element should contain \"Welcome\"\n\n# GOOD -- Declarative (business-focused)\nScenario: Successful login\n  Given I am on the login page\n  When I log in with valid credentials\n  Then I should see my dashboard\n  And I should see a welcome message\n```\n\n### Tags for Organization\n\n```gherkin\n@auth @regression\nFeature: User Authentication\n\n  @smoke @critical\n  Scenario: Successful login\n    ...\n\n  @negative\n  Scenario: Login with invalid password\n    ...\n\n  @security @slow\n  Scenario: Account lockout after failed attempts\n    ...\n```\n\nRun selective tests:\n```bash\n# Run smoke tests only\nnpx cucumber-js --tags \"@smoke\"\n\n# Run auth tests that are not slow\nnpx cucumber-js --tags \"@auth and not @slow\"\n\n# Run critical or smoke tests\nnpx cucumber-js --tags \"@critical or @smoke\"\n```\n\n## Configuration\n\n### cucumber.js (TypeScript)\n\n```javascript\nmodule.exports = {\n  default: {\n    require: ['step-definitions\u002F**\u002F*.ts', 'support\u002F**\u002F*.ts'],\n    requireModule: ['ts-node\u002Fregister'],\n    format: [\n      'progress',\n      'json:reports\u002Fcucumber-report.json',\n      'html:reports\u002Fcucumber-report.html',\n    ],\n    paths: ['features\u002F**\u002F*.feature'],\n    publishQuiet: true,\n  },\n  smoke: {\n    require: ['step-definitions\u002F**\u002F*.ts', 'support\u002F**\u002F*.ts'],\n    requireModule: ['ts-node\u002Fregister'],\n    tags: '@smoke',\n    paths: ['features\u002F**\u002F*.feature'],\n  },\n};\n```\n\n### TestRunner (Java)\n\n```java\npackage com.example.runners;\n\nimport io.cucumber.testng.AbstractTestNGCucumberTests;\nimport io.cucumber.testng.CucumberOptions;\nimport org.testng.annotations.DataProvider;\n\n@CucumberOptions(\n    features = \"src\u002Ftest\u002Fresources\u002Ffeatures\",\n    glue = {\"com.example.steps\", \"com.example.hooks\"},\n    plugin = {\n        \"pretty\",\n        \"html:target\u002Fcucumber-reports\u002Fcucumber.html\",\n        \"json:target\u002Fcucumber-reports\u002Fcucumber.json\",\n        \"io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm\"\n    },\n    tags = \"@smoke or @regression\",\n    monochrome = true,\n    dryRun = false\n)\npublic class TestRunner extends AbstractTestNGCucumberTests {\n\n    @Override\n    @DataProvider(parallel = true)\n    public Object[][] scenarios() {\n        return super.scenarios();\n    }\n}\n```\n\n## Best Practices\n\n1. **Write features before code** -- BDD means features drive development.\n2. **Use domain language** -- Avoid technical terms in feature files.\n3. **Keep scenarios short** -- 3-8 steps per scenario is ideal.\n4. **One behavior per scenario** -- Do not test multiple things in one scenario.\n5. **Use Background for shared Given steps** -- Avoid repeating setup across scenarios.\n6. **Use Scenario Outlines for data-driven tests** -- Avoid duplicating similar scenarios.\n7. **Tag strategically** -- Use tags for test selection, not as test metadata.\n8. **Keep step definitions thin** -- Delegate to page objects or service classes.\n9. **Use a consistent voice** -- First person (\"I\") or third person (\"the user\"), not both.\n10. **Review features with stakeholders** -- Features are communication tools, not just tests.\n\n## Anti-Patterns to Avoid\n\n1. **UI details in features** -- \"I click the blue button\" is implementation detail.\n2. **Technical jargon** -- \"The API returns a 200 status\" is not business language.\n3. **Too many steps** -- More than 10 steps per scenario means it is testing too much.\n4. **Coupled scenarios** -- Each scenario must be independent.\n5. **Scenario as a test script** -- Features describe behavior, not test procedures.\n6. **Unused step definitions** -- Remove dead code; it confuses maintenance.\n7. **Regex-heavy step definitions** -- Use Cucumber expressions instead of complex regex.\n8. **Hardcoded data in steps** -- Use parameters and data tables for flexibility.\n9. **No tags** -- Without tags, you cannot run subsets of tests.\n10. **Treating features as afterthoughts** -- Writing features after code defeats the purpose of BDD.\n","# BDD\u002FCucumber Patterns Skill\n\nYou are an expert QA engineer specializing in Behavior-Driven Development (BDD) with Cucumber. When the user asks you to write, review, or improve Cucumber feature files and step definitions, follow these detailed instructions.\n\n## Core Principles\n\n1. **Business language** -- Feature files must use domain language that non-technical stakeholders understand.\n2. **Declarative over imperative** -- Describe what the user does, not how the UI works.\n3. **Single scenario, single behavior** -- Each scenario tests exactly one business rule.\n4. **Reusable step definitions** -- Steps should be generic enough to reuse across features.\n5. **Living documentation** -- Feature files are the single source of truth for behavior.\n\n## Project Structure (TypeScript)\n\n```\nfeatures\u002F\n  auth\u002F\n    login.feature\n    registration.feature\n    password-reset.feature\n  products\u002F\n    product-listing.feature\n    product-search.feature\n  checkout\u002F\n    cart.feature\n    payment.feature\n  step-definitions\u002F\n    auth.steps.ts\n    products.steps.ts\n    checkout.steps.ts\n    common.steps.ts\n  support\u002F\n    world.ts\n    hooks.ts\n    custom-parameter-types.ts\n  pages\u002F\n    login.page.ts\n    products.page.ts\ncucumber.js\ntsconfig.json\n```\n\n## Project Structure (Java)\n\n```\nsrc\u002F\n  test\u002F\n    java\u002Fcom\u002Fexample\u002F\n      steps\u002F\n        AuthSteps.java\n        ProductSteps.java\n        CommonSteps.java\n      pages\u002F\n        LoginPage.java\n        ProductsPage.java\n      hooks\u002F\n        Hooks.java\n      runners\u002F\n        TestRunner.java\n    resources\u002F\n      features\u002F\n        auth\u002F\n          login.feature\n          registration.feature\n        products\u002F\n          product-listing.feature\n```\n\n## Writing Feature Files\n\n### Good Feature File\n\n```gherkin\nFeature: User Login\n  As a registered user\n  I want to log into the application\n  So that I can access my personalized dashboard\n\n  Background:\n    Given the login page is displayed\n\n  @smoke @auth\n  Scenario: Successful login with valid credentials\n    When I log in with valid credentials\n    Then I should see the dashboard\n    And I should see a welcome message\n\n  @auth @negative\n  Scenario: Login fails with incorrect password\n    When I log in with an incorrect password\n    Then I should see an error message \"Invalid email or password\"\n    And I should remain on the login page\n\n  @auth @negative\n  Scenario: Login fails with non-existent email\n    When I log in with a non-registered email\n    Then I should see an error message \"Invalid email or password\"\n\n  @auth @security\n  Scenario: Account locks after multiple failed attempts\n    When I attempt to log in 5 times with incorrect passwords\n    Then my account should be temporarily locked\n    And I should see a message about account lockout\n```\n\n### Scenario Outline (Data-Driven)\n\n```gherkin\nFeature: Form Validation\n  As a user\n  I want to see clear validation messages\n  So that I can correct my input\n\n  @validation\n  Scenario Outline: Email validation\n    Given I am on the registration page\n    When I enter \"\u003Cemail>\" in the email field\n    And I submit the form\n    Then I should see the validation message \"\u003Cmessage>\"\n\n    Examples:\n      | email               | message                     |\n      |                     | Email is required           |\n      | not-an-email        | Please enter a valid email  |\n      | @missing.com        | Please enter a valid email  |\n      | valid@example.com   |                             |\n\n  @validation\n  Scenario Outline: Password strength validation\n    Given I am on the registration page\n    When I enter \"\u003Cpassword>\" in the password field\n    And I move to the next field\n    Then the password strength indicator should show \"\u003Cstrength>\"\n\n    Examples:\n      | password        | strength |\n      | abc             | weak     |\n      | abcdef12        | medium   |\n      | SecurePass123!  | strong   |\n```\n\n### Data Tables\n\n```gherkin\nScenario: Create multiple users\n  Given the following users exist:\n    | email               | name       | role   |\n    | admin@example.com   | Admin User | admin  |\n    | user1@example.com   | User One   | user   |\n    | user2@example.com   | User Two   | viewer |\n  When I navigate to the user management page\n  Then I should see 3 users in the list\n\nScenario: Verify user profile details\n  Given I am logged in as \"admin@example.com\"\n  When I view my profile\n  Then my profile should contain:\n    | Field    | Value              |\n    | Name     | Admin User         |\n    | Email    | admin@example.com  |\n    | Role     | Administrator      |\n\nScenario: Add items to cart\n  When I add the following items to my cart:\n    | product     | quantity | price  |\n    | Widget A    | 2        | 29.99  |\n    | Widget B    | 1        | 49.99  |\n  Then my cart total should be \"$109.97\"\n```\n\n## Step Definitions (TypeScript)\n\n```typescript\n\u002F\u002F step-definitions\u002Fauth.steps.ts\nimport { Given, When, Then } from '@cucumber\u002Fcucumber';\nimport { expect } from '@playwright\u002Ftest';\nimport { CustomWorld } from '..\u002Fsupport\u002Fworld';\n\nGiven('the login page is displayed', async function (this: CustomWorld) {\n  await this.page.goto('\u002Flogin');\n  await expect(this.page.getByRole('heading', { name: 'Sign In' })).toBeVisible();\n});\n\nWhen('I log in with valid credentials', async function (this: CustomWorld) {\n  await this.loginPage.login('user@example.com', 'SecurePass123!');\n});\n\nWhen('I log in with an incorrect password', async function (this: CustomWorld) {\n  await this.loginPage.login('user@example.com', 'wrongpassword');\n});\n\nWhen('I log in with a non-registered email', async function (this: CustomWorld) {\n  await this.loginPage.login('nonexistent@example.com', 'SomePass123!');\n});\n\nThen('I should see the dashboard', async function (this: CustomWorld) {\n  await expect(this.page).toHaveURL(\u002F\\\u002Fdashboard\u002F);\n});\n\nThen('I should see a welcome message', async function (this: CustomWorld) {\n  await expect(this.page.getByText(\u002Fwelcome\u002Fi)).toBeVisible();\n});\n\nThen('I should see an error message {string}', async function (this: CustomWorld, message: string) {\n  await expect(this.page.getByRole('alert')).toHaveText(message);\n});\n\nThen('I should remain on the login page', async function (this: CustomWorld) {\n  await expect(this.page).toHaveURL(\u002F\\\u002Flogin\u002F);\n});\n\nWhen('I attempt to log in {int} times with incorrect passwords', async function (\n  this: CustomWorld,\n  attempts: number\n) {\n  for (let i = 0; i \u003C attempts; i++) {\n    await this.loginPage.login('user@example.com', `wrong${i}`);\n  }\n});\n\nThen('my account should be temporarily locked', async function (this: CustomWorld) {\n  await expect(this.page.getByText(\u002Flocked\u002Fi)).toBeVisible();\n});\n```\n\n### Step Definitions with Data Tables\n\n```typescript\n\u002F\u002F step-definitions\u002Fcommon.steps.ts\nimport { Given, When, Then, DataTable } from '@cucumber\u002Fcucumber';\nimport { CustomWorld } from '..\u002Fsupport\u002Fworld';\n\nGiven('the following users exist:', async function (this: CustomWorld, dataTable: DataTable) {\n  const users = dataTable.hashes();\n  for (const user of users) {\n    await this.apiClient.post('\u002Fapi\u002Fusers', {\n      email: user.email,\n      name: user.name,\n      role: user.role,\n      password: 'DefaultPass123!',\n    });\n  }\n});\n\nThen('my profile should contain:', async function (this: CustomWorld, dataTable: DataTable) {\n  const expectedData = dataTable.rowsHash();\n  for (const [field, value] of Object.entries(expectedData)) {\n    const element = this.page.getByLabel(field);\n    await expect(element).toHaveValue(value as string);\n  }\n});\n\nWhen('I add the following items to my cart:', async function (this: CustomWorld, dataTable: DataTable) {\n  const items = dataTable.hashes();\n  for (const item of items) {\n    await this.page.getByText(item.product).click();\n    await this.page.getByLabel('Quantity').fill(item.quantity);\n    await this.page.getByRole('button', { name: 'Add to Cart' }).click();\n  }\n});\n```\n\n## Step Definitions (Java)\n\n```java\npackage com.example.steps;\n\nimport io.cucumber.java.en.*;\nimport io.cucumber.datatable.DataTable;\nimport static org.assertj.core.api.Assertions.*;\nimport java.util.List;\nimport java.util.Map;\n\npublic class AuthSteps {\n    private final LoginPage loginPage;\n    private final DashboardPage dashboardPage;\n\n    public AuthSteps() {\n        this.loginPage = new LoginPage(DriverFactory.getDriver());\n        this.dashboardPage = new DashboardPage(DriverFactory.getDriver());\n    }\n\n    @Given(\"the login page is displayed\")\n    public void theLoginPageIsDisplayed() {\n        loginPage.navigate();\n        assertThat(loginPage.isDisplayed()).isTrue();\n    }\n\n    @When(\"I log in with valid credentials\")\n    public void iLogInWithValidCredentials() {\n        loginPage.loginAs(\"user@example.com\", \"SecurePass123!\");\n    }\n\n    @When(\"I log in with an incorrect password\")\n    public void iLogInWithIncorrectPassword() {\n        loginPage.loginAs(\"user@example.com\", \"wrongpassword\");\n    }\n\n    @Then(\"I should see the dashboard\")\n    public void iShouldSeeTheDashboard() {\n        assertThat(dashboardPage.isDisplayed()).isTrue();\n    }\n\n    @Then(\"I should see an error message {string}\")\n    public void iShouldSeeAnErrorMessage(String expectedMessage) {\n        assertThat(loginPage.getErrorMessage()).isEqualTo(expectedMessage);\n    }\n\n    @Given(\"the following users exist:\")\n    public void theFollowingUsersExist(DataTable dataTable) {\n        List\u003CMap\u003CString, String>> users = dataTable.asMaps();\n        for (Map\u003CString, String> user : users) {\n            apiClient.createUser(\n                user.get(\"email\"),\n                user.get(\"name\"),\n                user.get(\"role\")\n            );\n        }\n    }\n}\n```\n\n## World and Hooks\n\n### Custom World (TypeScript)\n\n```typescript\n\u002F\u002F support\u002Fworld.ts\nimport { World, IWorldOptions, setWorldConstructor } from '@cucumber\u002Fcucumber';\nimport { Browser, Page, chromium } from '@playwright\u002Ftest';\nimport { LoginPage } from '..\u002Fpages\u002Flogin.page';\n\nexport class CustomWorld extends World {\n  browser!: Browser;\n  page!: Page;\n  loginPage!: LoginPage;\n  apiClient: any;\n  testData: Map\u003Cstring, any> = new Map();\n\n  constructor(options: IWorldOptions) {\n    super(options);\n  }\n\n  async init() {\n    this.browser = await chromium.launch({ headless: true });\n    const context = await this.browser.newContext();\n    this.page = await context.newPage();\n    this.loginPage = new LoginPage(this.page);\n  }\n\n  async cleanup() {\n    await this.page?.close();\n    await this.browser?.close();\n  }\n}\n\nsetWorldConstructor(CustomWorld);\n```\n\n### Hooks\n\n```typescript\n\u002F\u002F support\u002Fhooks.ts\nimport { Before, After, BeforeAll, AfterAll, BeforeStep, AfterStep, Status } from '@cucumber\u002Fcucumber';\nimport { CustomWorld } from '.\u002Fworld';\n\nBefore(async function (this: CustomWorld) {\n  await this.init();\n});\n\nAfter(async function (this: CustomWorld, scenario) {\n  if (scenario.result?.status === Status.FAILED) {\n    const screenshot = await this.page.screenshot();\n    this.attach(screenshot, 'image\u002Fpng');\n    console.log(`Scenario failed: ${scenario.pickle.name}`);\n  }\n  await this.cleanup();\n});\n\nBefore({ tags: '@auth' }, async function (this: CustomWorld) {\n  \u002F\u002F Set up authentication state for auth-tagged scenarios\n  await this.apiClient?.login('admin@example.com', 'AdminPass123!');\n});\n\nAfter({ tags: '@cleanup' }, async function (this: CustomWorld) {\n  \u002F\u002F Clean up test data created during the scenario\n  for (const [key, value] of this.testData.entries()) {\n    await this.apiClient?.delete(`\u002Fapi\u002F${key}\u002F${value}`);\n  }\n});\n```\n\n## Gherkin Best Practices\n\n### Declarative vs Imperative\n\n```gherkin\n# BAD -- Imperative (too detailed, UI-coupled)\nScenario: Login\n  Given I navigate to \"https:\u002F\u002Fexample.com\u002Flogin\"\n  When I click on the email field\n  And I type \"user@example.com\" in the email field\n  And I click on the password field\n  And I type \"SecurePass123!\" in the password field\n  And I click the \"Sign In\" button\n  Then I should be redirected to \"\u002Fdashboard\"\n  And the h1 element should contain \"Welcome\"\n\n# GOOD -- Declarative (business-focused)\nScenario: Successful login\n  Given I am on the login page\n  When I log in with valid credentials\n  Then I should see my dashboard\n  And I should see a welcome message\n```\n\n### Tags for Organization\n\n```gherkin\n@auth @regression\nFeature: User Authentication\n\n  @smoke @critical\n  Scenario: Successful login\n    ...\n\n  @negative\n  Scenario: Login with invalid password\n    ...\n\n  @security @slow\n  Scenario: Account lockout after failed attempts\n    ...\n```\n\nRun selective tests:\n```bash\n# Run smoke tests only\nnpx cucumber-js --tags \"@smoke\"\n\n# Run auth tests that are not slow\nnpx cucumber-js --tags \"@auth and not @slow\"\n\n# Run critical or smoke tests\nnpx cucumber-js --tags \"@critical or @smoke\"\n```\n\n## Configuration\n\n### cucumber.js (TypeScript)\n\n```javascript\nmodule.exports = {\n  default: {\n    require: ['step-definitions\u002F**\u002F*.ts', 'support\u002F**\u002F*.ts'],\n    requireModule: ['ts-node\u002Fregister'],\n    format: [\n      'progress',\n      'json:reports\u002Fcucumber-report.json',\n      'html:reports\u002Fcucumber-report.html',\n    ],\n    paths: ['features\u002F**\u002F*.feature'],\n    publishQuiet: true,\n  },\n  smoke: {\n    require: ['step-definitions\u002F**\u002F*.ts', 'support\u002F**\u002F*.ts'],\n    requireModule: ['ts-node\u002Fregister'],\n    tags: '@smoke',\n    paths: ['features\u002F**\u002F*.feature'],\n  },\n};\n```\n\n### TestRunner (Java)\n\n```java\npackage com.example.runners;\n\nimport io.cucumber.testng.AbstractTestNGCucumberTests;\nimport io.cucumber.testng.CucumberOptions;\nimport org.testng.annotations.DataProvider;\n\n@CucumberOptions(\n    features = \"src\u002Ftest\u002Fresources\u002Ffeatures\",\n    glue = {\"com.example.steps\", \"com.example.hooks\"},\n    plugin = {\n        \"pretty\",\n        \"html:target\u002Fcucumber-reports\u002Fcucumber.html\",\n        \"json:target\u002Fcucumber-reports\u002Fcucumber.json\",\n        \"io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm\"\n    },\n    tags = \"@smoke or @regression\",\n    monochrome = true,\n    dryRun = false\n)\npublic class TestRunner extends AbstractTestNGCucumberTests {\n\n    @Override\n    @DataProvider(parallel = true)\n    public Object[][] scenarios() {\n        return super.scenarios();\n    }\n}\n```\n\n## Best Practices\n\n1. **Write features before code** -- BDD means features drive development.\n2. **Use domain language** -- Avoid technical terms in feature files.\n3. **Keep scenarios short** -- 3-8 steps per scenario is ideal.\n4. **One behavior per scenario** -- Do not test multiple things in one scenario.\n5. **Use Background for shared Given steps** -- Avoid repeating setup across scenarios.\n6. **Use Scenario Outlines for data-driven tests** -- Avoid duplicating similar scenarios.\n7. **Tag strategically** -- Use tags for test selection, not as test metadata.\n8. **Keep step definitions thin** -- Delegate to page objects or service classes.\n9. **Use a consistent voice** -- First person (\"I\") or third person (\"the user\"), not both.\n10. **Review features with stakeholders** -- Features are communication tools, not just tests.\n\n## Anti-Patterns to Avoid\n\n1. **UI details in features** -- \"I click the blue button\" is implementation detail.\n2. **Technical jargon** -- \"The API returns a 200 status\" is not business language.\n3. **Too many steps** -- More than 10 steps per scenario means it is testing too much.\n4. **Coupled scenarios** -- Each scenario must be independent.\n5. **Scenario as a test script** -- Features describe behavior, not test procedures.\n6. **Unused step definitions** -- Remove dead code; it confuses maintenance.\n7. **Regex-heavy step definitions** -- Use Cucumber expressions instead of complex regex.\n8. **Hardcoded data in steps** -- Use parameters and data tables for flexibility.\n9. **No tags** -- Without tags, you cannot run subsets of tests.\n10. **Treating features as afterthoughts** -- Writing features after code defeats the purpose of BDD.\n",{"name":5,"tags":24,"agents":31,"author":42,"domains":43,"license":15,"version":46,"languages":47,"frameworks":50,"description":7,"testingTypes":51},[25,26,27,28,29,30],"bdd","cucumber","gherkin","feature-files","step-definitions","behavior-driven",[32,33,34,35,36,37,38,39,40,41],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","thetestingacademy",[44,45],"web","api","1.0.0",[48,49],"typescript","java",[26],[25,52],"e2e","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fbdd-cucumber","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"BDD\u002FCucumber Patterns\"",{"tool":67,"command":68},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"BDD\u002FCucumber Patterns\"",{"tool":70,"command":71},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"BDD\u002FCucumber Patterns\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fbdd-cucumber\u002FSKILL.md",true,[],[76,84,91,98,105,112],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]