How benediktst/cucumber-playwright-starter works
This repository is a TypeScript starter for running browser-based UI tests with Cucumber and Playwright. The workflow is: invoke Cucumber, load the project configuration and hooks, create a per-scenario world and browser context, run test steps, then collect failure artifacts and reports. The tree contains no feature files or step definitions, so those test-domain stages are represented only as external inputs. The sampled hooks show browser/API context setup and trace handling; broader test execution behavior comes from the README, and unsampled integrations are not expanded.
Main entry points: common-hooks.ts Scenario Hooks · cucumber.mjs Cucumber Setup · allure-reporter.ts Allure Settings · custom-world.ts Scenario World
Components 14
Test Runtime
- Cucumber Setup
cucumber.mjs - Scenario Hooks
src/support/common-hooks.ts - Scenario World
src/support/custom-world.ts - Runtime Config
src/support/config.ts
Browser Support
- Playwright Browser
src/support/common-hooks.ts - API Context
src/support/common-hooks.ts
Test Results
- Cucumber Reporting
cucumber.mjs - Allure Settings
src/support/reporters/allure-reporter.ts - Failure Artifacts
src/support/common-hooks.ts - Test Reports
Other components
- Test Author
- Test Runner
- Gherkin Scenarios
- Application Under Test
Connections 15
- Test Author → Gherkin Scenarios: defines
README.md - Test Runner → Cucumber Setup: runs tests
README.md - Gherkin Scenarios → Cucumber Setup: supplies tests
README.md - Cucumber Setup → Scenario Hooks: loads support
cucumber.mjs - Scenario Hooks → Runtime Config: reads settings
src/support/common-hooks.ts - Scenario Hooks → Scenario World: uses scenario state
src/support/common-hooks.ts - Scenario Hooks → Playwright Browser: launches browser
src/support/common-hooks.ts - Scenario Hooks → API Context: creates context
src/support/common-hooks.ts - Playwright Browser → Application Under Test: drives UI
- API Context → Application Under Test: targets API
src/support/common-hooks.ts - Cucumber Setup → Cucumber Reporting: configures formats
cucumber.mjs - Cucumber Setup → Allure Settings: loads optionally
cucumber.mjs - Scenario Hooks → Failure Artifacts: captures failures
src/support/common-hooks.ts - Cucumber Reporting → Test Reports: writes reports
cucumber.mjs - Allure Settings → Test Reports: sets results directory
src/support/reporters/allure-reporter.ts