End to end tests for Archive.org using Playwright
- login to BrowserStack and retrieve the account username and access key, see documentation here
-
install dependencies:
npm i
-
install Playwright browser libs:
npx playwright install
-
run all the tests in headless mode and generate 1 whole test report:
npm run test
-
run all the tests in headless mode by each category and generate test report by category:
./run-tests.sh
-
run all the tests in headed mode (this will load multiple browsers):
npm run test:headed
- run books tests:
npm run test:books
- run collection tests:
npm run test:collection
- run details tests:
npm run test:details
- run home tests:
npm run test:home
- run login tests:
npm run test:login
- run music tests:
npm run test:music
- run search tests:
npm run test:search
- run books tests:
npm run test:books:headed
- run collection tests:
npm run test:collection:headed
- run details tests:
npm run test:details:headed
- run home tests:
npm run test:home:headed
- run login tests:
npm run test:login:headed
- run music tests:
npm run test:music:headed
- run search tests:
npm run test:search:headed
- install VSCode Playwright plugin to run specific tests using VSCode
- run command format:
npx playwright test <test-file-path>
- sample:
npx playwright test tests/search/search-layout.spec.ts
- run command format:
npx playwright test <test-file-path> --debug
- sample:
npx playwright test tests/search/search-layout.spec.ts --debug
- run:
npm run show:report