Team Conventions and Governance

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
Note: Conventions should be enforced automatically where possible via linters, formatters and CI checks.
Tip: Hold short reviews or brown-bag sessions to walk through examples of good tests and patterns.
Warning: Overly rigid rules can slow teams down; focus on standards that clearly improve readability and reliability.

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.

🧠 Test Yourself

What is a good approach to Playwright conventions in a large team?