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 currently work on an application that starts task in a 2nd application and polls them until completion. It would be very nice if we could record only the successful task polls. I imagine:
Test run with recording on
Test makes http call to start async task in 2nd app - recorded in VCR
Polls 2nd app to get task status - NOT recorded in VCR
Last poll will result in task complete - recorded in VCR
Today our cassettes might have dozens of task reports from polling events that really aren't needed when we run our tests.
The benefits are:
Smaller vcr cassettes
The tests will run faster without having to code your application to be aware of the testing environment (waiting before polling again).
Describe the solution you'd like
something very similar to the 'ignore_request' feature, where i could define a lambda that takes the response and returns true or false, something like:
Additional context
Somewhat related to: #287, but their situation seemed somewhat different.
In that issue, the recommendation is that their test decide when to record, but in my case my test is calling app code that is doing the polling. It wouldn't be proper to modify that code to be aware of vcr (that we only use for testing).
The text was updated successfully, but these errors were encountered:
I currently work on an application that starts task in a 2nd application and polls them until completion. It would be very nice if we could record only the successful task polls. I imagine:
Today our cassettes might have dozens of task reports from polling events that really aren't needed when we run our tests.
The benefits are:
Describe the solution you'd like
something very similar to the 'ignore_request' feature, where i could define a lambda that takes the response and returns true or false, something like:
Additional context
Somewhat related to: #287, but their situation seemed somewhat different.
In that issue, the recommendation is that their test decide when to record, but in my case my test is calling app code that is doing the polling. It wouldn't be proper to modify that code to be aware of vcr (that we only use for testing).
The text was updated successfully, but these errors were encountered: