Skip to content

roopeshh/amazon-nl-tests

Repository files navigation

Amazon.nl End-to-End Test Automation

Introduction

This project is designed to perform automated testing of functionalities of amazon.nl website using Playwright, Typescript.

Project structure

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

Prerequisites

  • 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

Setting up project

  • 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

Running the tests

  • 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

Test report

  • Once the tests are run, html report is generated in the folder reports and you can open index.html and it shows the report
  • In case of failed tests, the report also records screenshot, video and traces for the failed tests.

Continuous Integration

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.

Test cases

You can find the test cases document here

Test framework

You can find details on the design of framework here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published