Having a clear runbook speeds up onboarding for new team members and provides a standardized execution reference for CI/CD environments.
Here is a quick-start automation runbook covering prerequisites, environment variables, execution commands, and output artifacts for a Playwright test suite.
Prerequisites
Node.js: 24.x (configured via package.json engines)
Package Manager: npm
Optional: Docker (for containerized pipeline runs)
Quick Setup
# 1. Install project dependencies
cd <repo-root>
npm ci
# 2. Install Playwright browsers and dependencies
npx playwright install --with-deps
Execution Commands
Full Test Suite: npm test (executes run-all-tests.js)
API Suite Only: npm run test:api (executes run-api-tests.js)
UI Suite Only: npm run test:ui (executes run-ui-tests.js)
Generate Reports: npm run generate:reports
Core Environment Variables
Configure these keys inside your local .env file or CI secrets:
API_BASE_URL — Base endpoint URL for API testing
BASE_URL — Target website base URL for UI testing
RETRY_COUNT — Maximum retry limit for flaky scenario reruns
CUCUMBER_PARALLEL — Number of parallel workers for Cucumber execution
Test Artifacts & Outputs
Allure Execution Results: reports/allure-results
Cucumber JSON Reports: reports/cucumber_report.json
Failure Media (Videos/Screenshots): test-results/ (configured via config.js)
Top comments (0)