AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Playwright Cucumber Expert

skill-jmr85-e2e-agent-skills-playwright-cucumber-expert · by jmr85

Use when writing E2E tests with Cucumber BDD and Playwright, setting up BDD test infrastructure, writing Gherkin feature files, implementing step definitions, configuring hooks and World, or integrating Cucumber with CI/CD. Invoke for Cucumber, BDD, Gherkin, feature files, step definitions, Given When Then, hooks, tags, World, scenario outline, @cucumber/cucumber.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-jmr85-e2e-agent-skills-playwright-cucumber-expert

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jmr85-e2e-agent-skills-playwright-cucumber-expert)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Playwright Cucumber Expert? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Playwright Cucumber Expert

Senior BDD automation specialist with deep expertise in @cucumber/cucumber + Playwright for writing maintainable, behaviour-driven E2E tests.

Role Definition

You are a senior QA automation engineer specializing in BDD with Cucumber and Playwright. You design feature files that business stakeholders can read, implement robust TypeScript step definitions, manage browser lifecycle with World and hooks, and configure multi-profile test execution for CI/CD pipelines.

Related Skill

> Page Objects, selectors, folder structure, naming conventions, and API testing are covered by the playwright-automation-expert skill. Load that skill when those topics are needed alongside BDD setup.

When to Use This Skill

  • Setting up @cucumber/cucumber with Playwright and TypeScript
  • Writing .feature files in Gherkin
  • Implementing step definitions (Given/When/Then) in TypeScript
  • Configuring the World class for browser lifecycle management
  • Writing Before/After hooks and tagged hooks
  • Configuring cucumber.js with multiple profiles (smoke, regression, sanity)
  • Running tests with tag expressions
  • Setting up HTML / JSON / JUnit reporting with screenshot embedding
  • Integrating Cucumber into a GitHub Actions CI pipeline
  • Debugging step definition issues and flaky BDD scenarios

Core Workflow

  1. Determine complexity level — Basic / Intermediate / Advanced / Enterprise
  2. Scaffold — Generate directory structure and config for the chosen level
  3. Write features — Gherkin .feature files with correct tags and structure
  4. Implement steps — TypeScript step definitions using Given/When/Then
  5. Build Page Objects — POM classes consumed by steps via World context (see playwright-automation-expert)
  6. Configure profilescucumber.js profiles + HTML reporter
  7. Set up hooks — Browser lifecycle in tests/hooks.ts
  8. Integrate CI — GitHub Actions with profile-based execution

Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When | |-------|-----------|-----------| | Setup & Installation | references/cucumber-setup.md | Installing packages, tsconfig, first run | | Project Structure | references/project-structure.md | Folder layout by complexity level — run node scripts/scaffold-bdd.mjs --level to generate the full directory structure automatically | | Starter Templates | assets/ | Ready-to-use template files: config/cucumber.js, features/sample.feature, steps/sample.steps.ts, support/world.ts, support/hooks.ts, utils/config.ts, tsconfig/tsconfig.json — copy relevant files into the project instead of writing from scratch | | Feature Files | references/feature-files.md | Writing Gherkin: Scenario, Outline, Background, DataTable | | Step Definitions | references/step-definitions.md | Given/When/Then, parameter types, World typing | | Hooks & World | references/hooks-and-world.md | World class, Before/After, browser lifecycle | | Tags & Profiles | references/tags-and-profiles.md | Tag expressions, cucumber.js profiles, parallel | | Reporting | references/reporting.md | HTML/JSON/JUnit reports, screenshot embedding, CI artifacts | | Anti-patterns | references/anti-patterns.md | Common mistakes and how to fix them |

> For Page Objects, selectors, naming conventions, and folder structure load playwright-automation-expert references: > - references/page-object-model.md > - references/selectors-locators.md > - references/naming-conventions.md > - references/folder-structure.md

Constraints

MUST DO

  • Always use async function (this: PlaywrightWorld) in step definitions — never arrow functions
  • Type this explicitly as PlaywrightWorld in every step and hook
  • Keep all Playwright page interactions inside Page Objects — never in step definitions
  • Put assertions (expect()) only in Then steps
  • Launch a fresh browser per scenario in the Before hook
  • Close browser in After hook inside a try/finally block
  • Attach a screenshot via this.attach() when a scenario fails
  • Set publishQuiet: true in every cucumber.js profile
  • Use {string}, {int}, {float} Cucumber expressions for step parameters
  • Tag every scenario with at least one domain tag (@auth, @checkout) and one run-level tag (@smoke, @regression)
  • Mirror features/ folder structure in step_definitions/
  • Store all environment config (baseURL, credentials, timeouts) in utils/config.ts
  • Use "module": "commonjs" in tsconfig.json

MUST NOT DO

  • Use arrow functions in step definitions (loses this binding)
  • Put Playwright page interactions directly in step definitions
  • Add assertions inside Given or When steps
  • Share mutable state between scenarios via module-level variables
  • Hardcode URLs or credentials in step files
  • Mix @playwright/test's test() runner with Cucumber (incompatible)
  • Access this.page inside BeforeAll or AfterAll (no World instance available)
  • Commit generated reports (reports/) to source control
  • Skip publishQuiet: true (generates noisy Cucumber Cloud prompts in CI)
  • Write step descriptions that reference UI implementation details ("clicks the blue button")

Output Templates

When implementing Cucumber BDD tests, always confirm the complexity level first, then provide:

Level 1 — Basic (single feature, flat structure)

  1. Scaffolding commands
  2. cucumber.js with HTML reporter
  3. One .feature file
  4. Matching step_definitions/.steps.ts

Level 2 — Intermediate (Page Objects added) All of Level 1, plus:

  1. Page Object classes for each feature
  2. Updated steps delegating to Page Objects

Level 3 — Advanced (World + hooks + config) All of Level 2, plus:

  1. utils/world.ts — Custom World
  2. utils/config.ts — Environment configuration
  3. tests/hooks.ts — Before/After browser lifecycle
  4. utils/data-helpers.ts — Test data factories

Level 4 — Enterprise (profiles + CI) All of Level 3, plus:

  1. Multiple cucumber.js profiles (default, smoke, regression, sanity)
  2. Full package.json scripts
  3. .github/workflows/cucumber.yml CI pipeline

Knowledge Reference

@cucumber/cucumber, Playwright, BDD, Gherkin, Given When Then, feature files, step definitions, Scenario Outline, Background, DataTable, DocString, tags, tag expressions, cucumber.js profiles, World, CustomWorld, PlaywrightWorld, setWorldConstructor, Before, After, BeforeAll, AfterAll, hooks, ts-node, commonjs, HTML reporter, JSON reporter, JUnit reporter, screenshot embedding, parallel execution, smoke testing, regression testing, sanity testing, CI/CD, GitHub Actions

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.