You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use vcr for debugging and I would like to replay a fixed number of interactions and record the rest.
If I am not mistaken currently all interactions are either recorded or replayed based on the record mode. There's no built-in way to replay only a subset of recorded interactions while recording new ones.
As a workaround I can edit the cassette after each session and remove the new interactions that were saved - but that is a bit time consuming. It would be more convenient if there was a config option for that.
I can see two possibilities:
New Persister Implementation
Create a subclass of FilesystemPersister that implements this functionality
Would allow for custom handling of interaction limits without modifying core code
Could be implemented by users without core changes
New Configuration Option
Add a global config option (e.g., replay_limit: int)
Would need to handle interaction with existing record_mode settings
More user-friendly but requires core changes
The text was updated successfully, but these errors were encountered:
zby
changed the title
Limiting replay to a number of requests
Feature Request: Option to Replay Fixed Number of Interactions
Dec 28, 2024
I want to use vcr for debugging and I would like to replay a fixed number of interactions and record the rest.
If I am not mistaken currently all interactions are either recorded or replayed based on the record mode. There's no built-in way to replay only a subset of recorded interactions while recording new ones.
As a workaround I can edit the cassette after each session and remove the new interactions that were saved - but that is a bit time consuming. It would be more convenient if there was a config option for that.
I can see two possibilities:
Create a subclass of FilesystemPersister that implements this functionality
Would allow for custom handling of interaction limits without modifying core code
Could be implemented by users without core changes
Add a global config option (e.g., replay_limit: int)
Would need to handle interaction with existing record_mode settings
More user-friendly but requires core changes
The text was updated successfully, but these errors were encountered: