---
source: https://iinventedlight.com/library/notes/playwright-fixtures.md
title: "Playwright fixtures set up an isolated environment for each test"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Playwright docs); Apache-2.0 (microsoft/playwright (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Playwright docs, Fixtures, Apache-2.0 (https://raw.githubusercontent.com/microsoft/playwright/main/LICENSE). Copyright (c) Microsoft Corporation; microsoft/playwright (GitHub), Fixture types (Playwright source), Apache-2.0 (https://raw.githubusercontent.com/microsoft/playwright/main/LICENSE). Copyright (c) Microsoft Corporation."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: Playwright fixtures"
tags: [playwright, fixtures, testing]
client: Librarian
sources:
  - id: S1
    title: "Fixtures"
    publisher: Playwright docs
    url: https://playwright.dev/docs/test-fixtures
    accessed: 2026-11-16
    license: "Apache-2.0"
  - id: S2
    title: "Fixture types (Playwright source)"
    publisher: microsoft/playwright (GitHub)
    url: https://github.com/microsoft/playwright/blob/main/packages/playwright/src/common/fixtures.ts
    accessed: 2026-11-16
    license: "Apache-2.0"
---
# Playwright fixtures set up an isolated environment for each test
**Answer:** Playwright Test is based on test fixtures. A fixture sets up the environment for each test and gives that test only what it needs. Fixtures are isolated between tests. Built-in fixtures such as `page` are already in use in a first test. Worker fixtures are set up for each worker process, which is where you start shared services or servers.

## Scopes in source

The Playwright source types a fixture scope as `test` or `worker`. The fixture name comes from a `test.extend()` call.

## See also

- [playwright-headless-tests](https://iinventedlight.com/library/notes/playwright-headless-tests/)
- [playwright-locators](https://iinventedlight.com/library/notes/playwright-locators/)
- [playwright-async-assertions](https://iinventedlight.com/library/notes/playwright-async-assertions/)
- [playwright-route-mocking](https://iinventedlight.com/library/notes/playwright-route-mocking/)

## Claims

- id: C1
  claim: Playwright Test is based on test fixtures.
  source: S1
  evidence: "Playwright Test is based on the concept of test fixtures."

- id: C2
  claim: Fixtures are isolated between tests.
  source: S1
  evidence: "Test fixtures are isolated between tests."

- id: C3
  claim: Worker fixtures are set up for each worker process.
  source: S1
  evidence: "worker fixtures are set up for each worker process."

- id: C4
  claim: Fixture names come from a test.extend() call.
  source: S2
  evidence: "Fixture name comes from test.extend() call."

## Sources

- [S1] Fixtures. Playwright docs. https://playwright.dev/docs/test-fixtures . License: Apache-2.0. Accessed 2026-11-16.

- [S2] Fixture types (Playwright source). microsoft/playwright (GitHub). https://github.com/microsoft/playwright/blob/main/packages/playwright/src/common/fixtures.ts . License: Apache-2.0. Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Playwright docs, Fixtures, Apache-2.0 (https://raw.githubusercontent.com/microsoft/playwright/main/LICENSE). Copyright (c) Microsoft Corporation; microsoft/playwright (GitHub), Fixture types (Playwright source), Apache-2.0 (https://raw.githubusercontent.com/microsoft/playwright/main/LICENSE). Copyright (c) Microsoft Corporation. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
