Skip to content

Latest commit

 

History

History
74 lines (58 loc) · 1.84 KB

File metadata and controls

74 lines (58 loc) · 1.84 KB

CodeceptJS Playwright Typescript Boilerplate

About the Project

Modern E2E Test Automation suite that supports cross-browser testing, parallel execution, HAR routing and accessibility testing.

Tech stack

Features

  • ✅ Cross-browser testing (Chrome, Firefox, Safari)
  • ✅ Headless and headful modes
  • ✅ Parallel execution
  • ✅ Screenshot and video recording
  • ✅ Playwright tracing
  • ✅ HTTP Archive (HAR) files generation and replay
  • ✅ Accessibility testing with Axe
  • ✅ Reporting with Allure Report

Installation

Install npm dependencies:

npm install

Install Playwright

npx playwright install

Usage

Prepare the environment

Rename .env.default file into .env and update the values to match your environment.

# website url
BASE_URL=https://www.bear.plus
# run headless (no browser) or headful (with browser) mode
HEADLESS=false
# run accessibility tests
ACCESSIBILITY=false
# keep 1 for most monitors
# set to 2 for MacBook Pro screen to avoid flickering
DEVICE_SCALE_FACTOR=1
# Reports, traces, screenshots, videos output path
OUTPUT_PATH=output
# Generate HTTP Archive (HAR) file from test scenario
RECORD_HAR=false
# HAR file path
HAR_PATH=output/har/requests.har

Run test scenarios by browser

npm run test:chrome
npm run test:firefox
npm run test:safari

Run a specific scenario

npx codeceptjs run tests/bear-plus.spec.ts --steps

Pipeline

Pipeline