- Node 18
- npm 9
npm install
npx playwright install
npx playwright test
For selecting default environment to run tests on, set the env variable STAGE
with one of the following:
pro
(default) - https://www.mytheresa.comstaging
- https://staging.mytheresa.comtest
- https://test.mytheresa.comlocal
- https://local.mytheresa.com
The following browsers are acceptable:
chromium
firefox
webkit
In order to select specific one, specify it with parameter --project
on tests execution. For example:
npx playwright test --project firefox
If --project
is not specified, the tests will be executed on ALL available browsers.
npx playwright show-report
docker run -it --rm --ipc=host -v PATH_TO_PROJECT_DIRECTORY:/mytheresa-challenge -w /mytheresa-challenge mcr.microsoft.com/playwright:v1.36.2-jammy npm run test:ci
Note that version in image tag should match the version of playwright in package.json
The project is integrated with GitHub Actions, HTML report is published as a job artifact.
- Test 1 does a lot of requests to https://www.mytheresa.com/, so the tests that checks status codes might fail
- Test 3 writes CSV to the file
test-results\prs.csv
and to the console