Run BDD tests with Playwright runner
Tip
🔥 Check out what's new in Playwright-BDD v8
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 test files and run them with Playwright runner. Such approach brings all the benefits of Playwright runner:
- Automatic browser initialization and cleanup
- Auto-capture of screenshots, videos and traces
- Parallelization with sharding
- Auto-waiting of page elements
- Out-of-box visual comparison testing
- Power of Playwright fixtures
- ...a lot more
Some features were developed in Playwright-BDD on top of Playwright and BDD approaches:
- 🔥 Advanced tagging by path and special tags
- 🎩 Step decorators for class methods
- 🎯 Scoped step definitions
- ✨ Export steps for AI
- ♻️ Re-using step functions
Check out the documentation website.
There are several examples in examples
folder and a separate fully working repo playwright-bdd-example.
Feel free to get in touch:
- Open an issue on GitHub to report a bug or propose a new feature
- Join Playwright-BDD Discord server to connect with other developers, ask questions and share your BDD experience
Check out the latest changes in the CHANGELOG.md.
Your contributions are welcome! Please review CONTRIBUTING.md for the details.
Huge thanks to the sponsors of the Playwright-BDD project ❤️ Become a sponsor
Have a look on this section.
- playwright-network-cache - Speed up Playwright tests by caching network requests on the filesystem.
- playwright-magic-steps - Auto-transform JavaScript comments into Playwright steps.