A test automation setup model 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 the test structure
- Environment config, to run tests in multiple environment
- Prettier - to format the code
- ESLint, to identify wrong patterns in the code
- Husky, to check and improve commits
- commitlint, to check and improve commit messages
- GitHub Actions, to automatically trigger test execution in CI/CD
- mochawesome, to provide feedback about 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.spec.js'
, to run specific test file
Check other nice paramenters 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