lecture 3 of 170 completed

Fixtures as the architecture layer

Scopes, option fixtures, automatic fixtures and override chains. This is where Playwright stops being a runner and becomes a framework.

What you'll learn

  • What scope, option and automatic fixtures each do
  • Why worker scope is a sharing decision
  • Why every fixture is a permanent addition to the vocabulary

The intermediate track taught custom fixtures: setup before use, teardown after. This lecture is about the four capabilities that turn fixtures into an architecture, and the judgement each one requires.

Capability one: scope.

A fixture is either test-scoped (created for every test, the default) or worker-scoped (created once per worker process, shared by every test that worker runs).

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →