Skip to content

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

Notifications You must be signed in to change notification settings

bear-plus/codeceptjs-playwright-typescript-boilerplate

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published