A test automation repo for BOM rain check based on Cucumber(7) with Playwright using Typescript.
This repo is based on https://github.com/Tallyb/cucumber-playwright/
- Typescript setup for writing steps with eslint/typescript and prettier
- Launching of Playwright browser before running all tests
- Running feature with video recording option
- Report generated with last good image attached
- Utilies functions
Weather BOM raincheck feature
- Clone from https://github.com/rajeshkumargit/playwright-weathercheck.git
- Upgrade node/npm to latest
- In the cloned directory, Run
npm install
- Followed by
npx playwright install
npm run test
or npx cucumber-js
runs all tests
By default we will use chromium. You can define an envrionment variable called BROWSER and set the name of the browser. Available options: chromium, firefox, webkit
On Linux and Mac you can write: BROWSER="Google Chrome" npm run test
BROWSER=firefox npm run test
or BROWSER=firefox npx cucumber-js
runs all tests using Firefox
On Windows you need to write
set BROWSER=Google Chrome
npm run test
specific browser with tag example,
set BROWSER="Google Chrome" npm run test -- -t @weather
Warning Headless mode doesn't work with BOM since web scraping is disabled on this site
(Default cucumber report is generated in /reports directory)
The last reporter/formatter found on the cucumber-js command-line wins:
--format summary --format @cucumber/pretty-formatter --format cucumber-console-formatter
In cucumber.mjs file, modify the options.
- run the command
npm run report
.