Playwright 1.36 test template.
E2E tests for https://www.saucedemo.com/
REST API tests for https://jsonplaceholder.typicode.com/
- Clone repository
- Enter the project directory and execute
npm installin order to install all the packages
- npm install @playwright/test
- npx playwright install
E2E tests use playground https://www.saucedemo.com/
- basic test execution:
npx playwright test --headedwheretests/e2eis a deafult directory - run tests using npm with chromium:
npm run tests:chromethat uses defaulttests/e2edirectory - also works for
tests:firefoxandtests:webkit - test directory can be changed in
playwright.config.ts - it is possible to add more flags with
-- --flag - run tests with reporter:
npx playwright test --reporter=html
API tests using use Supertest and https://jsonplaceholder.typicode.com/ as a fake API
- run
npm run tests:api