{"schemaVersion":"1.0","canonicalUrl":"https://automationtester.in/failures/pytest-fixture-not-found","slug":"pytest-fixture-not-found","title":"pytest fixture not found","signature":"fixture 'name' not found","frameworks":["pytest"],"classification":"dependency","summary":"pytest could not find a fixture with the requested name in the test's visible fixture scope.","causes":[{"title":"The fixture module is outside discovery scope","explanation":"Fixtures are visible through conftest.py hierarchy or registered plugins, not arbitrary imports by convention.","diagnostic":"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."},{"title":"The fixture was renamed or misspelled","explanation":"The test parameter no longer matches the fixture function name.","diagnostic":"Compare the requested name with the available-fixtures section in the error.","fix":"Update the parameter or provide a compatibility fixture during migration."},{"title":"The plugin providing the fixture is not installed","explanation":"Local and CI dependency sets may differ.","diagnostic":"Compare locked dependencies and plugin registration in both environments.","fix":"Add the plugin to the test dependency group and lock it."}],"prevention":["Keep fixture scope close to consumers.","Run collection in CI.","Lock test plugins."],"related":["dependency-module-not-found","test-data-unique-constraint"],"references":[{"label":"pytest fixtures","url":"https://docs.pytest.org/en/stable/how-to/fixtures.html"}]}