Skip to content

FireSage/quality-final

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saucedemo.com test automation

This project contains automated tests for the [Quality Store]https://ui-automation-camp.vercel.app/ e-commerce website. Test coverage includes:
authentication add-to-cart cart product-gallery-home-page product-details checkout filter-and-sort search contact

Setup

Clone the repository Open the folder in your shell (such as bash or power shell) Run

npm install 

to install dependencies

Testing

Run

npx cypress run

to run all tests

To run individual test suites

npx cypress run test --spec ".\cypress\e2e\tests\[filename]"

e.g.

for login

    npx cypress run --spec ".\cypress\e2e\tests\Login.cy.js"

for sorting

    npx cypress run --spec ".\cypress\e2e\test\filter-and-sort.cy.js"

for Add to cart

    npx cypress run --spec ".\cypress\e2e\test\add-to-cart.cy.js"

for checkout

    npx cypress run --spec ".\cypress\e2e\test\checkout.cy.js"

Cross-browser testing

The project is configured for cross browser testing. Tests run in Google Chrome by default but changing this to run in other browsers or multiple browsers is simple. User the '--browser' argument when running the test:

npx cypress run --browser [browser name]

e.g.

npx cypress run --browser firefox

Testing with Random Products

Shopping cart checkout is tested with ramdom products. A randdom index is generated and used to select a product/(s) from the products list for each test.

MochaAwesome reporter

The project is configgured to work with the MochaAwesome reporter. to user the reporter add the "--reporter mochawesome" argument. For example:

    npx cypress run --reporter mochawesome
    npx cypress run --spec ".\cypress\e2e\test\checkout.cy.js" --reporter mochawesome

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published