Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

playwright-cucumber-expertPlaywright cucumber expert 测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

808

周安装

34

GitHub Stars

7

下载量

283
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:playwright-cucumber-expert(Playwright cucumber expert 测试)
来源仓库:https://github.com/jmr85/e2e-agent-skills
仓库路径:skills/playwright-cucumber-expert
安装命令:
npx skills add https://github.com/jmr85/e2e-agent-skills --skill playwright-cucumber-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jmr85/e2e-agent-skills --skill playwright-cucumber-expert

简介

用于辅助测试设计、自动化测试、用例整理和回归验证。

  • 适合编写单元测试、端到端测试或根据失败日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据,避免误改逻辑。
  • 涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。
  • playwright-cucumber-expert 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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:

TopicReferenceLoad When
Setup & Installationreferences/cucumber-setup.mdInstalling packages, tsconfig, first run
Project Structurereferences/project-structure.mdFolder layout by complexity level — run node scripts/scaffold-bdd.mjs --level <1-4> to generate the full directory structure automatically
Starter Templatesassets/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 Filesreferences/feature-files.mdWriting Gherkin: Scenario, Outline, Background, DataTable
Step Definitionsreferences/step-definitions.mdGiven/When/Then, parameter types, World typing
Hooks & Worldreferences/hooks-and-world.mdWorld class, Before/After, browser lifecycle
Tags & Profilesreferences/tags-and-profiles.mdTag expressions, cucumber.js profiles, parallel
Reportingreferences/reporting.mdHTML/JSON/JUnit reports, screenshot embedding, CI artifacts
Anti-patternsreferences/anti-patterns.mdCommon 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/<name>.steps.ts

Level 2 — Intermediate (Page Objects added) All of Level 1, plus: 5. Page Object classes for each feature 6. Updated steps delegating to Page Objects

Level 3 — Advanced (World + hooks + config) All of Level 2, plus: 7. utils/world.ts — Custom World 8. utils/config.ts — Environment configuration 9. tests/hooks.ts — Before/After browser lifecycle 10. utils/data-helpers.ts — Test data factories

Level 4 — Enterprise (profiles + CI) All of Level 3, plus: 11. Multiple cucumber.js profiles (default, smoke, regression, sanity) 12. Full package.json scripts 13. .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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.28%
按下载量换算100

Claude

29.09%
按下载量换算82

Cursor

18.13%
按下载量换算51

Gemini CLI

7.99%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills