Walkthrough to install, set up and run the tests.
Scenarios for the Website SauceLab Demo
Install latest NodeJS
Note: Check
Add to PATH
option during the installation
Install latest GIT to clone the repository
In your terminal, run this command to clone and install all dependencies
git clone https://github.com/WillCoutinho/playwright-with-cucumberJS.git && cd playwright-with-cucumberJS && npm i
To run all tests use the command: npm run test
To run a specific scenario or feature, use a tag parameter: npm run test -- -t @example_tag
List of tags
Feature | Tag |
---|---|
User Login | @loginFeature |
Inventory | @inventoryFeature |
Shopping Cart | @shoppingCartFeature |
Checkout | @checkoutFeature |
Run the command below and the tests report will be available in your browser.
npm run report && start reports/cucumber_report.html
GitHub: Playwright with Cucumber
- Playwright - Webdriver Library
- Cucumber - BDD Framework
- Cucumber HTML Reporter - Report Library
- Chai - Assertion Library
- Prettier - Code formatter