Skip to content

ideadapt/playwright-bdd

Repository files navigation

playwright-bdd

lint test npm version license

Run BDD tests with Playwright runner.

Inspired by the issue in the Playwright repo microsoft/playwright#11975

🔥 Check out decorators syntax to define BDD steps right inside Page Object Models

Why Playwright runner?

Both Playwright and CucumberJS have their own test runners. You can use CucumberJS runner with Playwright as a library to test BDD scenarios. This package offers an alternative way: convert BDD scenarios into Playwright tests and run them with Playwright runner as usual. Such approach brings all the benefits of Playwright runner:

Documentation

Check out documentation website.

Example

Clone and play with playwright-bdd-example repo.

Feedback

Feel free to share your feedback in issues.

Changelog

Inspect the latest updates in the changelog.

Sponsors

Great thanks to sponsors for supporting playwright-bdd project ❤️ Become a sponsor

Currents.devArturs Leščinskis

How to make BDD valuable for my project?

Have a look on this section.

Development

Test locally on different Playwright versions

# install needed Playwright version
npm i --no-save @playwright/[email protected]

# install corresponding chromium without clearing other versions
npx cross-env PLAYWRIGHT_SKIP_BROWSER_GC=1 playwright install chromium

# run all tests
npm run test

# run particular test
npm run only

License

MIT

About

BDD testing with Playwright runner

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 73.6%
  • JavaScript 16.7%
  • Gherkin 9.1%
  • Other 0.6%