Contributing

Web testing guidelines

Practical guidelines for unit, integration, and end-to-end testing on the web.

Unit and integration testing

When writing unit and integration tests, these are three guidelines that we need to pay attention to:

  1. Query priorities
  2. Testing appearance and disappearance
  3. Opting in for interactions instead of events

Please make sure that all questions and assertions in your test files follow those testing guidelines.

End-to-end testing

Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.

Please read more about how to implement page object models in Playwright.

Previous
Conventions