This project is designed to perform automated testing of functionalities of amazon.nl website using Playwright, Typescript.
amazon-nl-testing/
├── src/
│ ├── config/ # Configuration files
│ ├── pages/ # Pages
│ ├── tests/ # Test files
├── .env # Environment variables
├── playwright.config.ts # Playwright config
└── package.json # Project metadata and scripts
- Node.js: Version 22
- Yarn: Package manager for installing dependencies
- Windows: PowerShell or Command Prompt
- MacBook: Terminal
- VS Code or any other IDEs to look at the project structure
- Clone the repository - https://github.com/roopeshh/amazon-nl-tests
- Navigate to the project directory:
cd amazon-nl-testing
- Install dependencies:
yarn install
- Duplicate
.env.example
and rename it to.env
- add your test amazon.nl
user email
- add your test amazon.nl
password
- add your test amazon.nl
first name
of the user
- add your test amazon.nl
-
Run all tests:
yarn test
-
Run tests in headed mode:
yarn test:ui
-
Run a specific test file:
yarn test tests/amazon.spec.ts
-
Run tests with specific project (e.g., Chromium):
npx playwright test --project=Chromium
- Once the tests are run, html report is generated in the folder
reports
and you can openindex.html
and it shows the report - In case of failed tests, the report also records screenshot, video and traces for the failed tests.
This project is integrated with GitHub Actions. The workflow file (.github/workflows/e2e-tests.yml
) is configured to run on every push to the main
branch. After the tests, it uploads the html test report to GitHub Actions artifacts.
Note: On CI the tests fail. Instead of navigating to home page, it goes to captcha as security check which does not happen when we run the tests locally.
You can find the test cases document here
You can find details on the design of framework here