Getting Started

KeyValue
StatusActive
OwnerQA Automation
Updated2026-03-26
ScopeLocal setup, first test runs, and first-day orientation

This page is for someone joining the repo and trying to get productive without reading half the codebase first. The goal is simple: get the project installed, run a safe first test, and understand what the system produces when it runs.

What You Are Setting Up

PW-Tests is a Playwright-based quality platform for six CNC websites. A local setup gives you:

  • smoke and suite-level test runs
  • structured logs in test-results/
  • screenshots and traces for failures
  • local access to the same scripts CI uses for Slack, reports, monitoring, and observability checks

You do not need every external integration configured on day one. Local testing works without Slack, Grafana, or OpenSearch.

Prerequisites

RequirementWhat To Have
Node.jsA recent Node 18+ environment
npmStandard npm install support
GitAny recent Git client
Playwright browsersInstalled locally after npm install

Optional but useful:

Optional ServiceWhy It Helps
Slack credentialsLets you test Slack posting paths
Grafana service accountLets you validate dashboards and OpenSearch proxy access
OpenSearch credentialsLets you inspect live telemetry, retention setup, and observability quality

First-Time Setup

StepActionWhy It Matters
1Clone the repo and enter the workspaceStandard local setup
2Run npm installInstalls dependencies and local scripts
3Run npx playwright installInstalls Chromium, WebKit, and Firefox support
4Copy .env.example to .env if neededGives you a place for local overrides and credentials
5Start with one safe suite, not everythingYou get a fast signal before going deeper

Start small. The best first run is one that tells you the environment works.

CommandWhen To Use ItExpected Outcome
SITE=auto npm run test:smokeFirst local validationFast pass/fail on one site
npm run test:smokeFirst all-site checkQuick health pass across all configured sites
npm run test:pdtWhen you want deployment-style coverageBroader functional confidence
npm run test:e2eWhen you want journey coverageSlower, deeper, more failure context
npm run test:mobile:smokeWhen working on mobile-safe changesPR-friendly mobile tier
npm run test:contentWhen working on content-rendering or registry coverageRegistry-driven module validation

What A Healthy First Run Looks Like

On a healthy local setup, you should see:

  • Playwright start cleanly
  • the target site open and handle consent
  • per-test pass/fail output
  • artifacts created only when needed
  • test-results/ populated with logs and suite output

If the first run fails, that is still useful. The repo is built to leave evidence behind.

Where To Look After A Run

PathWhat You Will Find
test-results/logs/Structured JSONL logs for AI and debugging workflows
test-results/artifacts/Failure screenshots, traces, and per-test artifacts
test-results/results.jsonMachine-readable merged result file used by notifiers
test-results/history/Run history used by recurrence and trend logic
tests/visual.spec.ts-snapshots/Visual baselines when the visual suite is in play

What To Configure Early

You can be productive with almost no configuration, but these settings usually come next:

Setting AreaWhy Teams Usually Add It Early
SITEHelpful for default single-site work
Slack credentialsLets you test run alerts and reporting locally
Grafana tokenNeeded for dashboard deploy, validation, and some OpenSearch proxy flows
OpenSearch URL and tokenNeeded for telemetry verification and retention setup

See Configuration Guide for the full environment map.

A Good First-Day Workflow

GoalRecommended Path
Learn the repoRead Architecture Overview after your first passing smoke run
Understand suite purposeRead Test Types
Find commands quicklyUse CLI Reference
Understand failuresRead Failure Categories and Troubleshooting
Work with alerts and dashboardsRead Integrations and Reporting

Common “What Should I Run?” Answers

SituationBest Starting Command
“I just pulled main and want a fast confidence check.”npm run test:smoke
“I’m working on deploy-critical behavior.”npm run test:pdt
“I changed a full user path.”npm run test:e2e or npm run test:user-flows
“I changed responsive or touch behavior.”npm run test:mobile:smoke
“I changed content modules or registry entries.”npm run test:content
“I’m investigating flaky production failures.”npm run os:failed, then the relevant suite

Use this when you want the full local operator setup, not just a passing test run.

ItemWhy It Helps
Set up .envKeeps local overrides explicit
Verify Slack postingMakes notifier debugging much easier
Verify Grafana proxy accessNeeded for OpenSearch and dashboard work
Run npm run observability:verify:healthConfirms the monitoring stack can be reached
Run one content test and one mobile testGives you a feel for the two most specialized suites
Read .confluence/WRITING_RULES.mdImportant if you touch Confluence-source docs

What New Contributors Usually Miss

  • this repo has many npm scripts, but most work starts with a small handful
  • the visual suite is baseline-dependent and behaves differently from text-first suites
  • content tests are not generic page checks; they are registry-driven and handler-based
  • Slack messages are part of the product surface, not an afterthought
  • the Confluence-source docs in docs/wiki/ and docs/confluence/ are maintained as publishable source, not just internal notes

Next Stops

After this page, the best next reads are:

  1. Architecture Overview
  2. Test Types
  3. CLI Reference