This is Cypress and JavaScript based automation framework to test few test cases on 'https://www.saucedemo.com/' webpage.
- node : v16.15.0
- npm : 8.5.5
- Cypress : 12.8.1
- Internet connection
- Login page
- Verify invalid inputs for username and password : This is to verify messages when empty username and password given.
- Verify invalid user login : This is to verify behavior when invalid username given.
- Verify standard user login : This is to verify success standard user login flow.
- Inventory page
- Verify Details on Inventory page : This is to verify initial details , items on Inventory page.
- Verify Add/Remove to cart : This is to verify behavior of adding and removing item
- Verify Cart item count function : This is to verify count on cart when adding and removing item.
- In QA-Tools-Cypress-Web-Automation-Framework folder run below command to run all test cases
npx cypress run --spec "cypress/e2e/*.cy.js"
- Run page related test cases
- To run Login page test cases :
npx cypress run --spec "cypress/e2e/LoginPageTest.cy.js"
- To run In page test cases :
npx cypress run --spec "cypress/e2e/InventoryPageTest.cy.js"
- Open below file on browser to check html reports.
cypress/reports/html/index.html
- To data driven test used fixtures LoginPageFields.json.
- Use cypress.config.js to store important reusing variables such as base url ,common usernames in env.