Skip to content

vaimo/automationpractice

Repository files navigation

HH QE Sportwear Test Automation

End-to-end test automation framework for Helly Hansen Sportwear applications using:

  • Playwright
  • Cucumber (BDD)
  • TypeScript
  • Allure Reporting

This framework supports multi-environment, multi-locale, and multi-device (desktop/mobile) execution.


Prerequisites

  • Node.js (recommended version: 18+)
  • npm (comes with Node.js)
  • Git
  • (Optional) Visual Studio Code

Project Setup

1. Install dependencies

npm install

2. Install Playwright browsers

npx playwright install

Project Structure (High Level)

HH-QE-Sportwear-TestAutomation
├── tests
│   ├── features
│   │   ├── desktop
│   │   └── mobile
│   ├── step-definitions
│   └── support
│       ├── world.ts
│       ├── hooks.ts
│       └── helpers
├── page-objects
├── config
│   ├── env
│   │   ├── stg.json
│   │   └── stg3.json
│   └── locales
│       └── en_us.json
├── reports                # generated
├── allure-results         # generated
├── allure-report          # generated
├── package.json
├── cucumber.js
├── .gitignore
└── README.md

Generated folders like node_modules, reports, allure-results, and allure-report are ignored via .gitignore and should not be committed.


Test Execution

The framework execution is fully driven by environment variables.

Required Environment Variables

Variable Description Example
TEST_ENV Target environment stg, stg3
LOCALE Site locale en_us
DEVICE_TYPE Device type desktop / mobile
BROWSER Browser chromium
TAGS Cucumber tags @e2e_desktop

Sample Execution Command (Recommended)

TEST_ENV=stg LOCALE=en_us DEVICE_TYPE=desktop BROWSER=chromium TAGS="@e2e_desktop" npm test

This command will:

  • Run tagged scenarios
  • Generate Allure results
  • Generate Allure report
  • Not automatically open the report

Windows PowerShell Example

$env:TEST_ENV="stg"
$env:LOCALE="en_us"
$env:DEVICE_TYPE="desktop"
$env:BROWSER="chromium"
$env:TAGS="@e2e_desktop"
npm test

Tags and Targeted Runs

Tags are defined in feature files and controlled via the TAGS environment variable.

Common tags:

  • @smoke
  • @regression
  • @e2e_desktop
  • @e2e_mobile

Allure Reporting

Generate Allure Report

(Allure report is generated automatically as part of test execution)

npm test

Open Allure Report (Manual)

npm run allure:open

Opening the Allure report is intentionally manual to support CI/CD execution.


Configuration

Environment Configs

Located under:

config/env/

Examples:

  • stg.json
  • stg3.json

These files must contain only non-sensitive / dummy data.


Locale Configs

Located under:

config/locales/

Best Practices

  • Do not commit secrets or real credentials
  • Keep all environment-specific data configurable
  • Use Page Object Model for UI interactions
  • Use tags to control execution scope
  • Keep generated artifacts out of version control

Troubleshooting

Playwright browsers missing

npx playwright install

Allure CLI not available (macOS)

brew install allure

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors