Troubleshooting¶
Common problems and how to fix them.
fixture 'page' not found¶
Symptom: Running pytest --breadcrumb fails immediately with:
Cause: The page fixture comes from pytest-playwright, which must be installed separately.
Fix:
Or reinstall with the [playwright] extra, which now includes it:
Healing isn't working¶
Symptom: Tests still fail on locator changes even after running them once.
Causes & fixes:
test_idis not stable — If you use the standalone wrapper without an explicittest_id, breadcrumb infers one from the call stack. Renaming the calling file or function changes the inferred ID, breaking fingerprint lookup.
Fix: always pass an explicit, stable test_id:
- Database is in the wrong place —
.breadcrumb.dbis created in the directory you run Python or pytest from. If you run from different directories, multiple databases are created and fingerprints are not shared.
Fix: pin the database path:
Or inpytest.ini:
- Confidence threshold too high — The default is
0.5. If your app has large DOM changes between versions (many classes and IDs renamed at once), the best candidate might score below0.5.
Fix: lower the threshold:
Do not go below0.3 — false positives become likely.
- First run didn't fingerprint — Breadcrumb only saves fingerprints when a locator action succeeds. If the first run also failed (e.g. the page wasn't loaded), no fingerprint was stored.
Fix: run the test against the working version of the app first, then introduce the locator change.
Confidence scores are always low¶
Symptom: breadcrumb doctor or breadcrumb report shows healing events with confidence around 0.3–0.4.
Causes & fixes:
-
Too many DOM changes at once — breadcrumb scores 7 signals. If most signals changed simultaneously, the overall score is naturally lower. Lower the threshold slightly or consider whether the page changed so dramatically that re-fingerprinting makes more sense.
-
Text content locale/dynamic changes — if element text is dynamic (e.g. "Welcome, Alice" vs "Welcome, Bob"), the text signal contributes noise. Use
data-testidattributes on stable elements for more reliable healing.
breadcrumb report shows no data¶
Symptom: breadcrumb report prints zeroes or "No healing events recorded."
Causes & fixes:
- Tests weren't run with
--breadcrumb. Breadcrumb only records data when the plugin is active. - Database is in a different directory than where you're running the CLI. Use
--dbto point to the right file:
Tests are quarantined unexpectedly¶
Symptom: Tests skip automatically with a quarantine notice.
Explanation: Breadcrumb quarantines tests whose flip rate (pass/fail alternation) exceeds 20% over the last 10 runs. This is intentional to prevent flaky tests from blocking CI.
Fix:
- Check breadcrumb doctor to see how many tests are quarantined.
- Stabilize the underlying test, then clear quarantine by deleting the quarantined_tests rows from .breadcrumb.db or re-running the test suite enough times to establish a stable pass/fail pattern.
breadcrumb generate fails¶
Symptom: Error: AI test generation requires additional dependencies.
Fix:
breadcrumb mcp fails¶
Symptom: Error: MCP server requires the 'mcp' extra.
Fix:
Integration tests fail or are skipped¶
Integration tests (in tests/test_integration.py) require a real Chromium browser and must be opted into explicitly:
Without --integration, the tests are silently skipped (not failed).