Skip to content

rey-rios/saucedemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

saucedemo

Sauce Demo repo for https://www.saucedemo.com/

Requirements

  1. Chrome browser installed
  2. Nodejs installed
  3. Testcafe installed

Installation

  1. Clone repository using git bash to your desired location:
    git clone https://github.com/rey-rios/saucedemo.git

  2. Open the cloned project using Visual Studio Code (VSCode)

  3. In VSCode's terminal run the following command:
    npm install

  4. Create a .env file at project's root

  5. 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}
    ---------------------------

Running the tests

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

About

Sauce Demo repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published