How-To Guides¶
These guides assume you have completed the Tutorial and have a working record-replay setup. Each guide solves one specific task.
Guides¶
- Run in CI without warehouse credentials — configure GitHub Actions to use cassettes instead of a live database
- Configure the plugin via ini — set defaults in
pyproject.tomlorpytest.ini - Name cassettes per test — control cassette directory names with the marker
- Use multiple drivers in one session — wrap connections to different databases
- Scrub sensitive values from cassettes — remove tokens or passwords before cassettes are written to disk
- Register custom parameter serialisers — handle parameter types not covered by the default JSON encoder
- Use with connection pools — test code that uses connection pool libraries like adbc-poolhouse
When to use a How-To guide¶
How-To guides are for specific tasks. If you are new to the plugin, start with the Tutorial instead. If you want to understand why the plugin works the way it does, see the Explanation articles. If you need exact values (defaults, types, accepted inputs), see the Reference section.
Each guide here assumes:
- The plugin is installed (
pip install pytest-adbc-replay) - You have either set
adbc_auto_patchinpyproject.tomlor have aconftest.pythat wraps your connection withadbc_replay.wrap()oradbc_connect - Your tests are decorated with
@pytest.mark.adbc_cassetteor you understand the auto-derived naming convention