When multiple teams contribute to the same Playwright suite, conventions and governance become as important as individual test quality. Clear guidelines prevent style drift and keep the suite coherent.
Defining Team Conventions for Playwright
Conventions typically cover naming, folder structure, tagging, fixture usage, page object patterns and how to handle flaky tests. Documenting these rules in a short guide reduces friction for new contributors.
Example conventions:
- Test files end with .spec.ts and live under tests/
- One describe block per feature, ArrangeβActβAssert structure
- Page models in models/, services in services/
- Tags: @smoke, @regression, @a11y
- Flaky tests must be annotated and tracked in a shared list
Governance also includes deciding who owns shared utilities, who approves changes to core config and how you phase in new patterns.
Common Mistakes
Mistake 1 β Having no documented conventions
This leads to inconsistent tests.
β Wrong: Letting every team invent its own structure.
β Correct: Agree on a small set of simple, enforced guidelines.
Mistake 2 β Enforcing rules only via code review
This is error-prone.
β Wrong: Relying on reviewers to catch every style issue manually.
β Correct: Use tooling (ESLint, formatters, CI checks) to automate enforcement.