Sauce Demo repo for https://www.saucedemo.com/
- Chrome browser installed
- Nodejs installed
- Testcafe installed
-
Clone repository using git bash to your desired location:
git clone https://github.com/rey-rios/saucedemo.git
-
Open the cloned project using Visual Studio Code (VSCode)
-
In VSCode's terminal run the following command:
npm install
-
Create a .env file at project's root
-
Populate the .env file with valid username and password for the Suacedemo app
Example below, replace the values in curly braces (remove the curly braces as well):-------.env file-----------
USER_NAME={valid_user_name}
PASSWORD={valid_password}
---------------------------
Execute below command in VSCode's terminal to run all the tests in Chrome:
npm run test-all-chrome
Execute below command in VSCode's terminal to run all the tests in Chrome and generate a HTML execution report*:
npm run test-all-chrome-with-report
Execute below command in VSCode's terminal to run all the tests in Firefox:
npm run test-all-firefox
Execute below command in VSCode's terminal to run all the tests in Firefox and generate a HTML execution report*:
npm run test-all-firefox-with-report
Execute below command in VSCode's terminal to run all the tests in Safari:
npm run test-all-safari
Execute below command in VSCode's terminal to run all the tests in Safari and generate a HTML execution report*:
npm run test-all-safari-with-report
Execute below command in VSCode's terminal to run all the tests in MS Edge:
npm run test-all-edge
Execute below command in VSCode's terminal to run all the tests in MS Edge and generate a HTML execution report*:
npm run test-all-edge-with-report
*HTML Execution Report will be located in below path:
page_model/reports/report.html