Skip to content

derevyankoyuvl/henckels-automation

Repository files navigation

Henckels Automation

End-to-end test automation suite for the Henckels e-commerce platform, built with CodeceptJS and Playwright. This project covers checkout flows, payment methods, promo codes, and more, with support for multi-device and multi-environment testing.


Table of Contents


Features

  • Page Object Model for maintainable test code
  • Multi-environment support (next, staging, prod)
  • Multi-device/browser testing (desktop, tablet, mobile)
  • Allure reporting integration
  • Email and data helpers (MailSlurp, Faker)
  • Docker support for CI/CD

Prerequisites

  • Node.js (v16 or later recommended)
  • npm or yarn
  • Docker (optional, for containerized runs)
  • MailSlurp account (for email testing)

Setup

  1. Clone the repository:

    git clone https://github.com/your-org/henckels-automation.git
    cd henckels-automation/henckels-automation
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Configure environment variables:

    Copy .env.example to .env and fill in the required values:

    cp .env.example .env

    Example .env values:

    NODE_ENV=staging
    HEADLESS=true
    BROWSER=chromium
    MAILSLURP_API_KEY=your-mailslurp-api-key
    

Usage

Running Tests

  • Smoke tests:

    npm run test:smoke
  • Regression tests:

    npm run test:regression
  • Environment-specific:

    npm run test:next
    npm run test:staging
    npm run test:prod
  • Device-specific:

    npm run test:mobile
    npm run test:tablet
    npm run test:desktop
  • Parallel execution:

    npm run test:parallel
  • Multi-device execution:

    npm run test:multi-device
  • Headless mode:

    npm run test:headless
  • Dockerized run:

    npm run test:docker

Allure Reporting

  • Generate report:

    npm run report:generate
  • Open report:

    npm run report:open

Test Structure

  • pages/ — Page Object Models (e.g., CheckoutPage.js)
  • tests/ — Test suites (*_test.js)
  • helpers/ — Custom helpers (e.g., DataHelper.js, MailSlurpHelper.js)
  • components/ — Shared UI components
  • output/ — Test artifacts (screenshots, logs)
  • allure-results/ — Allure raw results

Environment Variables

Set these in your .env file:

Variable Description
NODE_ENV Test environment (next, staging, prod)
HEADLESS Run browser in headless mode (true/false)
BROWSER Browser to use (chromium, firefox, webkit)
SCREEN_SIZE Device size (desktop, tablet, mobile)
MAILSLURP_API_KEY API key for MailSlurp email testing

Contributing

  1. Fork the repository
  2. Create a new branch
    git checkout -b feature/your-feature
  3. Make your changes
  4. Write or update tests
  5. Run tests locally
    npm test
  6. Commit and push
    git commit -m "Describe your change"
    git push origin feature/your-feature
  7. Open a Pull Request on GitHub

Code style:

  • Follow existing patterns and naming conventions.
  • Use async/await for asynchronous operations.
  • Prefer data-test or data-testid attributes for selectors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published