Skip to main content
All failure patterns
Dependency or configurationpytest

pytest fixture not found

pytest could not find a fixture with the requested name in the test's visible fixture scope.

RECOGNIZABLE ERROR

fixture 'name' not found

RANKED DIAGNOSIS

What usually causes it

  1. 01

    The fixture module is outside discovery scope

    Fixtures are visible through conftest.py hierarchy or registered plugins, not arbitrary imports by convention.

    DIAGNOSE

    Run `pytest --fixtures` for the failing path and confirm the fixture is listed.

    FIX

    Move the fixture to the correct conftest.py or register its plugin explicitly.

  2. 02

    The fixture was renamed or misspelled

    The test parameter no longer matches the fixture function name.

    DIAGNOSE

    Compare the requested name with the available-fixtures section in the error.

    FIX

    Update the parameter or provide a compatibility fixture during migration.

  3. 03

    The plugin providing the fixture is not installed

    Local and CI dependency sets may differ.

    DIAGNOSE

    Compare locked dependencies and plugin registration in both environments.

    FIX

    Add the plugin to the test dependency group and lock it.

Prevent the repeat

  • Keep fixture scope close to consumers.
  • Run collection in CI.
  • Lock test plugins.

Primary references

Run this against your evidence

The browser triage workflow uses the same stable pattern slug and does not upload your paste.

Open local triage

Related failure patterns