epignosisx / vcr.net

Record your .NET Core test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
MIT License
11 stars 1 forks source link

Setting RecordMode to 'None' for a Request with no Recorded Cassette Results in MatchNotFoundException #3

Closed sdepouw closed 1 year ago

sdepouw commented 1 year ago

Hello, I was looking for a means to disable VCR.NET recording/playback (while sussing out the external resource / etc., without having to go and delete the newly-created Cassette file after every test run). So, I attempted the following:

_vcr.UseCassette(cassetteName, RecordMode.None)

Is there some other way I can inform VCR to basically do nothing for playback and recording so I can just let the HTTP traffic flow through without any VCR interaction?

epignosisx commented 1 year ago

@sdepouw the meaning of RecordMode.None is that it will not record anything, everything will be playback. None of the RecordMode enum values provide the behavior you are expecting. See them all here documented:

https://github.com/epignosisx/vcr.net/blob/master/src/Vcr/RecordMode.cs