This repository contains a BDD test framework example using Playwright, Cucumber and Page Object Model pattern.
- Download the zip file or clone this repository.
- Change the directory to
playwright-pom-bdd
.
cd playwright-pom-bdd
- Install dependencies.
npm install
- Install browsers.
npx playwright install
- Run tests.
# run all the tests/features.
npm run test
# Run specific test(s) using specific tag(s).
# You can use Feature file level or test scenario level tags for fine control over execution.
# run all tests with @login tag.
npm run tag "@login"
# run all tests tagged with @cart_footer and @copyright, BOTH tags.
npm run tag "@cart_footer and @copyright"
# run all tests excepts the tests with @login tag.
npm run tag "not @login"
- Generate a nice HTML report.
npm run report