Automation QA with Playwright
4 videosA step-by-step path for manual testers who want to become automation QA: from your first Playwright test to reliable tests running in CI.
Part 3 · Maintainable tests
1:217Structure your tests: describe, hooks, tags
Group tests with describe, share setup in beforeEach, keep every test independent in a fresh browser context, and pick what to run with tags like @smoke.
1:178Page Object Model
Stop repeating locators across tests: put each page's locators and actions in a class, so tests read like manual steps and a UI change is fixed in one place.
1:229Log in once, and use fixtures
Stop logging in through the form in every test: save the session as storage state in a setup project, reuse it in the config, and share helpers with fixtures.
1:2010API testing and mocking the network
Use the request fixture to prepare data through the API, and page.route to fake server responses so you can test empty lists, errors and slow responses.