본문으로 건너뛰기
cccskills
무료GitHub에 공개

cucumber-bdd

Cucumber BDD integration for AID methodology. Gherkin-first acceptance criteria with executable specifications. Use for writing feature files, step definitions, and running acceptance tests.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(7)

  • SKILL.md6.6 KB
  • references/cucumber-go-guide.md9.5 KB
  • references/cucumber-java-guide.md7.2 KB
  • references/cucumber-js-guide.md10.0 KB
  • references/cucumber-python-guide.md7.5 KB
  • references/cucumber-ruby-guide.md5.6 KB
  • SKILL.extended.md8.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Cucumber BDD Skill

Turn acceptance criteria into executable tests: .feature files (Gherkin) → step definitions → HTML report.

Phase Integration

PhaseCucumber ActivityDeliverable
1 PRDWrite acceptance criteria as .feature filesfeatures/*.feature
2 Tech SpecDefine step definition architectureStep definition plan
3 Impl PlanPlan step implementation tasksTask breakdown
4 DevelopmentImplement step definitions (TDD)features/step-definitions/*.ts
5 QA & ShipExecute scenarios, verify all passreports/cucumber-report.html

Quick Start

# Phase 1: write feature file, e.g. features/auth/login.feature
# Phase 4: see undefined steps, then implement features/step-definitions/auth.steps.ts
npm run cucumber:dry
# Phase 5: execute and generate report
npm run test:bdd

Gherkin Keywords

KeywordPurposeExample
FeatureDescribes the feature being testedFeature: User Authentication
ScenarioA single test caseScenario: Successful login
GivenPrecondition/contextGiven I am on the login page
WhenAction being testedWhen I enter valid credentials
ThenExpected outcomeThen I should see the dashboard
And / ButAdditional stepsAnd I should see a welcome message
BackgroundShared preconditionsRuns before each scenario
Scenario OutlineParameterized scenariosWith Examples table

Feature File Template

Emit traceability comments, tags, a WHY/BUSINESS VALUE docstring, the As a/I want/So that role block, Background, then scenarios.

# Research: PROJECT-A-INT-001, PROJECT-A-JTBD-002
# PRD: US-001 User Login
@auth @critical
Feature: User Authentication
  """
  WHY: Users need secure access to personal data
  BUSINESS VALUE: Reduces support tickets by 40%
  """

  As a registered user
  I want to log in with my credentials
  So that I can access my personalized dashboard

  Background:
    Given the authentication service is running
    And I am on the login page

  @smoke @happy-path
  Scenario: Successful login with valid credentials
    Given I have a registered account with email "user@example.com"
    When I enter email "user@example.com"
    And I enter password "SecurePass123!"
    And I click the login button
    Then I should be redirected to the dashboard
    And I should see "Welcome back, User"

  @error-handling
  Scenario: Failed login shows helpful error message
    When I enter email "unknown@example.com"
    And I enter password "wrongpassword"
    And I click the login button
    Then I should see error message "Invalid email or password"
    And I should remain on the login page
    And the password field should be cleared

  @security
  Scenario Outline: Account lockout after failed attempts
    Given I have a registered account with email "<email>"
    When I enter incorrect password <attempts> times
    Then my account should be <status>
    And I should see "<message>"

    Examples:
      | email              | attempts | status  | message                           |
      | user@example.com   | 3        | active  | 2 attempts remaining              |
      | user@example.com   | 5        | locked  | Account locked. Reset password.   |

Step Definition Patterns

Given sets up preconditions (test data factories, navigation), When performs actions, Then asserts outcomes. Use {string} parameters instead of hardcoding values.

// features/step-definitions/auth.steps.ts
import { Given, When, Then } from '@cucumber/cucumber';
import { expect } from 'expect';

Given('I am on the login page', async function() {
  await this.page.goto('/login');
});

Given('I have a registered account with email {string}', async function(email: string) {
  this.testUser = await createTestUser({ email });
});

When('I enter email {string}', async function(email: string) {
  await this.page.fill('#email', email);
});

When('I click the login button', async function() {
  await this.page.click('#login-button');
  await this.page.waitForNavigation();
});

Then('I should be redirected to the dashboard', async function() {
  expect(this.page.url()).toContain('/dashboard');
});

Then('I should see error message {string}', async function(message: string) {
  const error = await this.page.textContent('.error-message');
  expect(error).toBe(message);
});

Share state across steps via a custom World class (page, testUser, response) in features/support/world.ts — see references/cucumber-js-guide.md for the CustomWorld implementation and hooks.

Tag Standards

TagWhen to UseCI Behavior
@criticalMust pass for releaseBlocks deployment
@smokeQuick sanity checksRuns on every PR
@regressionFull test suiteRuns nightly
@wipWork in progressExcluded from CI
@skipTemporarily disabledExcluded (document reason!)
@manualCannot be automatedExcluded
@securitySecurity-related testsRuns on security review
@performancePerformance testsRuns on performance review
@flakyKnown flaky testsRetried automatically

Tag Filtering

npx cucumber-js --tags "@critical"
npm run test:smoke
npx cucumber-js --tags "not @wip and not @manual"
npx cucumber-js --tags "@critical and @security"
npx cucumber-js --tags "@smoke or @critical"

Commands

CommandPurpose
npm run cucumberRun all features with default profile
npm run cucumber:dryValidate syntax without executing
npm run test:bddRun and generate HTML report
npm run test:smokeRun @smoke scenarios only
npm run test:criticalRun @critical scenarios only

Related Skills

  • aid-prd - PRD writing (where Gherkin acceptance criteria are created)
  • test-driven - TDD methodology (Cucumber at the top of test pyramid)
  • aid-qa-ship - QA verification (running Cucumber scenarios before release)

Resources

  • Cucumber.js Documentation
  • Gherkin Reference
  • Language setup guides: references/cucumber-js-guide.md, references/cucumber-python-guide.md, references/cucumber-java-guide.md, references/cucumber-go-guide.md, references/cucumber-ruby-guide.md

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

AID Phase 4 - Development phase. Use for implementing features, TDD practices, code reviews, transitioning from planning to QA.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ilandahan/AID102026년 9월 23일 업데이트

AID Phase 0 - Research & discovery. Use for validating problem spaces, identifying stakeholders, defining success metrics, deciding whether to proceed.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ilandahan/AID102026년 9월 23일 업데이트

AID Phase 3 - Implementation Planning with consolidation-first approach. Resolves contradictions between PRD and Tech Spec, creates consolidated master document, then breaks down into actionable tasks and populates Jira. Includes sprint planning and risk assessment.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ilandahan/AID102026년 9월 23일 업데이트

aid-prd

무료

AID Phase 1 - PRD creation. Use for user stories, acceptance criteria, scoping features, transitioning from discovery to tech spec.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ilandahan/AID102026년 9월 23일 업데이트

AID Phase 5 - QA and Release. Use for validating implementations, acceptance tests, preparing releases, deployment, operational readiness.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ilandahan/AID102026년 9월 23일 업데이트

AID Phase 2 - Technical Specification. Use for system architecture, API contracts, data models, security architecture, transitioning from PRD to implementation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ilandahan/AID102026년 9월 23일 업데이트

ilandahan의 스킬 모두 보기

이 스킬의 문제 신고