🇧🇷 Para Português, clique aqui.
Example for the article Playwright, BDD, Cucumber & my opinion about it
If you find it useful, consider leaving a ⭐️ for this repo. Happy Testing 🎭!
- Playwright v1.33.0
- Cucumber v9.1.2
- ts-node: v10.9.1
- typescript: v5.0.4
- Node v19.8.1
- npm v9.6.5
On your terminal, run:
git clone https://github.com/raptatinha/blog-playwright-bdd.git
cd blog-playwright-bdd
npm i
To run the Cucumber tests (under /bdd-tests):
npx cucumber-js
To run the playwright with and without bdd testes (under /tests):
npx playwright test
The test "Has Title" is intentionally failing so we can see the reports.
To see the Cucumber report, open the file bdd-tests/reports/cucumber-report.html on your browser.
The Playwright report will open automatically on failures.
For this project, coding good practices were not prioritizes since the main goal is to demo the usage of Playwright and BDD. Only the minimun setup was implemented for this demo.
-
Talk about Playwright by Stefan Teixeira for Minas Testing Conference 2022
-
Framework with all the setup playwright-bdd
-
Playwright with BDD in JavaScript
-
Framework docs Cucumber
-
More robust implementation: https://github.com/Tallyb/cucumber-playwright/
-
Nice reading about BDD
🙌🏽 Kudos everyone!