playwright-bdd code coverage example with monocart-coverage-reports
- Fork the repo playwright-bdd-example
- Install
npm i monocart-coverage-reports -D
- Auto test fixture for collecting coverage data, see steps/fixtures.ts
- global.setup.ts and global-teardown.ts for generating coverage reports
- Coverage options see mcr.config.ts, Playwright config see playwright.config.ts
npm run test
Coverage report will be found here: coverage-reports/index.html
Example project that uses playwright-bdd to run BDD tests.
-
Fork the repo
-
Clone it to your local machine
git clone https://github.com/<%your github username%>/playwright-bdd-example.git
-
Change directory to
playwright-bdd-example
cd playwright-bdd-example
-
Install dependencies
npm install
-
Install browsers
npx playwright install
-
Run tests
npm test
Output:
Running 2 tests using 1 worker 2 passed (2.3s)
-
Make changes reproducing a bug
-
Commit and push changes
git add . git commit -m'repro for playwright-bdd issue xxx' git push
-
Open a pull-request and share the link