-
Integrate Playwright tests with GitHub Actions workflows to easily run API and end-to-end tests across multiple browsers and platforms.
-
Page Object Model (POM) is used in test automation to reduce code duplication and improve test maintenance.
-
Several useful commands to run locally:
- Runs the end-to-end tests:
npx playwright test
- Starts the interactive UI mode:
npx playwright test --ui
- Runs the tests only on Desktop Chrome:
npx playwright test --project=chromium
- Runs the tests in a specific file:
npx playwright test example
- Runs the tests in debug mode:
npx playwright test --debug
- Auto generate tests with Codegen:
npx playwright codegen
- Runs the end-to-end tests:
-
On the workflow details page, click the “Run workflow” button in the dialog box to start the workflow manually
📗 Here's saucedemo-tests, which tests login, checkout, etc.
npx playwright test tests/saucedemo-tests