Extending The System

KeyValue
StatusActive
OwnerQA Automation
Updated2026-03-26
ScopeHow to add sites, suites, handlers, integrations, and publishable documentation safely

Extending PW-Tests is less about adding more code and more about putting new behavior in the right place. The repo is easier to maintain when site-specific logic stays in config, suite-specific behavior stays near the suite, and operational behavior stays in scripts and services instead of leaking into every test.

The Right Way To Add Something New

You Want To AddStart With
new siteshared site config and selectors
new test suitesuite file plus CI wiring and docs
new content surfacecontent registry and the right handler
new failure intelligenceservice layer and data files
new integrationsrc/integrations/ or scripts/ plus docs
new Confluence pagedocs/wiki/ or docs/confluence/ plus publishing flow

Adding A New Site

StepWhat To Do
1add the site configuration and base selectors
2define consent behavior correctly
3add or verify mobile surfaces if mobile matters
4run smoke first, then PDT and one deeper suite
5update docs so operators know the site’s quirks

Important rule: do not bury one site’s exception inside generic helpers if it is truly site-specific.

Adding A New Test Suite

Before adding a suite, answer this first: what decision will this suite help someone make?

Good reasons:

  • it covers a risk area the current suites miss
  • it gives a cheaper signal than a deeper suite
  • it protects revenue, compliance, or editorial production

Weak reasons:

  • it duplicates existing coverage with a new name
  • it exists only because one test did not fit neatly somewhere else

Adding To The Content System

Content work has its own structure. New module coverage usually belongs in the content registry and handler system, not as one-off logic in unrelated suites.

If You Need To Add...Usually Update...
a new module typecontent registry plus handler support
a better seed URLregistry entry or site seed source
a new interaction depthcontent tests tiering and handler logic

Adding Failure Intelligence

If you are extending incident understanding, keep the layers separate.

LayerGood Extension Example
symptom parsingdetect a new technical failure shape
incident memoryadd a resolved recurring incident
priorsimprove weighting from recoveries
Slack verdict logicimprove how confidence is described to humans

Adding An Integration

A good integration has three parts:

  1. clear config and credentials
  2. a narrow code boundary
  3. docs that explain who uses it and why

That keeps the repo from turning into a pile of hidden environment assumptions.

Extending Confluence Documentation

Confluence-source docs are first-class project assets here. If you add a feature, update the docs in the same change.

RuleWhy It Matters
write for humans, not just for grepthese pages are operator documentation
avoid heavy code blocksConfluence pages should stay readable
prefer tables and expand sectionsbetter scanning in Confluence
keep the published source in gitdocs should be reviewable like code

Good Extension Checklist

CheckWhy It Protects The Repo
config lives in the right layeravoids hidden coupling
commands are documentedoperators can actually use the feature
CI job has a clear purposeavoids schedule bloat
Slack behavior is intentionalprevents noisy or misleading alerts
docs are updatedavoids drift between repo and Confluence
  1. define the problem clearly
  2. choose the right layer for the change
  3. implement the smallest version that proves the value
  4. wire CI and reporting only if the signal is worth it
  5. update docs and publishable Confluence source in the same pass
NeedGo To
system layoutArchitecture Overview
suite purposeTest Types
config and env varsConfiguration Guide
Confluence rules.confluence/WRITING_RULES.md in the repo