epignosisx / vcr.net Goto Github PK
View Code? Open in Web Editor NEWRecord your .NET Core test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
License: MIT License
Record your .NET Core test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
License: MIT License
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)
MatchNotFoundException
is thrown (if there's no cassette file recorded)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?
In my test case, I'm trying to use the RecordMode.Once
to record the cassettes in the first run and then replay the payloads during consecutive runs. The API that I'm recording is using API key authentication in headers. I don't want to store the API Key in a cassette in source control and I don't want to compare this header during playbacks.
I tried to use the IgnoreHeaders
property of DefaultRequestMatcher
but it is not used during the recording (which conceptually makes sense for your design). On the other hand, when replaying, the IgnoreHeaders
seems to be used as a blacklist, but it should be a whitelist for comparison.
if (IgnoreHeaders.Contains(recordedHeader.Key))
return false; // <---
should be:
if (IgnoreHeaders.Contains(recordedHeader.Key))
continue; // <---
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.