3 tips to tune your VCR in tests | Arkency Blog
18-Feb-2021 1434
VCR is a tool which I’d classify as useful in snapshot testing. You record a snapshot of an interaction with a System Under Test. Once recorded, these interactions are replayed from stored files — snapshots.VCR specifically records HTTP interactions and stores results of such in YAML files called “tapes”. A tape consists of series of requested URL, request headers, response headers and returned body. There may be multiple requests and responses stored in a single tape.When added to project, VCR installs globally and intercepts all HTTP requests made in a test environment. When there’s no tape recorded for an interaction, an error is raised, i.e.:.
3 tips to tune your VCR in tests | Arkency Blog #ruby #rubydeveloper #rubyonrails #tests #Arkency #blog #tests https://rubyonrails.ba/link/3-tips-to-tune-your-vcr-in-tests-arkency-blog