A E2E test automation setup that you can apply in the real world.
This project was inspired by the cypress-lab repo which has the same purpose but using Cypress framework.
- ✅ Playwright, to create and run E2E tests
- ✅ ServeRest, an amazing server that simulates an e-commerce to be tested
- ✅ Faker, to generate randon data for tests
- ✅ Page Object model, 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
- ✅ Testing Parallelization, to accelerate test execution
- ❌ mochawesome, to provide feedback about test execution
-
Clone repo and access project folder
https://github.com/danilofeijo/playwright-lab.git && cd playwright-lab
-
Install project dependencies
npm install
npx playwright test
is the default command. It runs tests in headless mode (default)
--ui
run tests in UI mode (better dev experience)--project firefox
specify which browser you would like to run the tests--headed
show you how Playwright interacts with the website.-g "critical"
run a test with a specific title--loremIpsum
specify which environment you would like to run the tests
The full list of parameters is available at Running Tests page on Playwright docs.
- Playwright Docs
- Choose an open source license
- Como escolher uma licença para seu projeto
- ServeRest
- More itens to be added