This project demonstrates test automation for the SauceDemo website using the Cypress framework and the Page Object Model (POM) design pattern.
Make sure the following tools are installed in your development environment:
- Node.js (version 6 or higher)
- npm (Node.js package manager)
- Google Chrome (browser for test execution)
-
Clone this repository to your local machine:
git clone https://github.com/Erick-N-B-Araujo/cypress-pageobject-saucedemo.git
-
Navigate to the project directory:
cd cypress-pageobject-saucedemo
-
Install project dependencies:
npm install
cypress/
: Contains automated tests and page objects (Page Objects).cypress/integration/
: Contains test specification files.cypress/support/
: Contains custom commands and additional configurations.cypress.json
: Cypress configuration file.package.json
: Lists project dependencies and scripts.
To open the Cypress graphical interface and run tests interactively:
npx cypress open
In the Cypress interface, select the desired browser (e.g., Chrome) and click on the test you want to execute.
To run all tests in headless mode (without a graphical interface):
npx cypress run
This project is configured to generate test reports using Mochawesome. After running the tests, an HTML report will be generated in the mochawesome-report
directory.
The Page Object Model pattern is used in this project to promote code reuse and facilitate test maintenance. The page objects are located in the cypress/support/pageObjects
directory.
If you want to support this project, leave a ⭐.
This project was created with ❤️ by Erick.