A E2E test automation setup that you can apply in the real world.
- ✅ ServeRest, an amazing server that simulates an e-commerce to be tested
- ✅ Cypress, to create and run E2E tests
- ✅ Faker, to generate randon data for tests
- ✅ "Page Action" custom pattern, to organize test structure
- ✅ Environment config, to run tests in multiple environment
- ✅ Test retry , to repeat failed tests and avoid flakiness
- ✅ Prettier - to format the code
- ✅ ESLint, to identify wrong patterns in the code
- ✅ Husky, to check enhance commits
- ✅ commitlint, to mantain better commit messages based on Conventional Commits
- ✅ GitHub Actions, to automatically trigger test execution in CI/CD
- ✅ mochawesome, to provide feedback about test execution
- ❌ Testing Parallelization, to accelerate test execution
-
Clone and access the cloned repo folder
$ git clone https://github.com/danilofeijo/cypress-lab.git && cd cypress-lab
-
Install the project dependencies
$ npm install
Run npx cypress open
, to open the Cypress Test Runner.
Check more available commands by visiting scripts
session on package.json
file.
- from Cypress
--browser chrome
, to set browser (default is Electron)--headless
, to headless execution (default for Electron)--headed
, to non headless execution (default for Chrome/Firefox)--env configFile=<env>
, to set an environment (default is 'qa')--spec '<file-path>/test-file.cy.js'
, to run specific test file
Check other nice parameters by visiting the Command Line Cypress page.
- Cypress Docs
- Utilizando Cypress na vida real
- Keep passwords secret in E2E tests
- ServeRest
- Publish your Cypress Test Report with GitHub Actions
- Conventional Commits
- ESLint + Prettier, a dupla perfeita para produtividade e padronização de código.
- Choose an open source license
- Como escolher uma licença para seu projeto