CheckOps home

Tools directory

V

CheckOps

VCR (Ruby)

VCR is a Ruby library that records your test suite's HTTP interactions to cassettes and replays them in future runs for fast, deterministic, accurate tests; it uses the Hippocratic License 2.1.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

VCR records your test suite’s HTTP interactions and replays them during future test runs for fast, deterministic, accurate tests. It is the original library that inspired ports such as VCR.py, and it remains widely used in Ruby projects that integrate with third-party APIs.

Wrap code in VCR.use_cassette("name") { ... } (or use the RSpec metadata integration) and the first run records real requests and responses to a YAML cassette; later runs replay them. VCR hooks into HTTP libraries through WebMock or other adapters, and supports record modes (:once, :new_episodes, :none, :all), configurable request matching, filter_sensitive_data to keep secrets out of cassettes, automatic re-recording intervals and ERB in cassettes. Licensing is unusual: the project uses the Hippocratic License 2.1, which grants broad permissions conditioned on compliance with human rights principles; organisations should review it with legal advisers. Version 6.4.1 was released on 30 October 2026.

Its documentation site is generated from Cucumber features describing each option.

Features

  1. Record and replay: Real HTTP captured once, replayed thereafter.
  2. Record modes: once, new_episodes, none and all.
  3. Sensitive data filtering: Keep tokens out of cassettes.
  4. RSpec integration: Cassettes via example metadata.

Pros

  1. Free: No cost to use.
  2. Mature: The original record-and-replay library.

Cons

  1. Licence review: The Hippocratic License is not an OSI-approved open-source licence.
  2. Stale cassettes: Recorded responses drift from real APIs over time.
VCR.configure do |c|
  c.cassette_library_dir = "spec/cassettes"
  c.hook_into :webmock
  c.configure_rspec_metadata!
  c.filter_sensitive_data("<API_KEY>") { ENV["API_KEY"] }
end

RSpec.describe WeatherClient, :vcr do
  it "fetches the forecast" do
    expect(WeatherClient.new.today("London")).to include("temp")
  end
end

Resources:

Pricing

Free to use under the Hippocratic License 2.1 (see the repository’s LICENSE for conditions).

  1. Ruby apps calling third-party APIs that should be tested offline.
  2. Teams able to accept the Hippocratic License after review.

Conclusion

VCR is the original and still excellent record-and-replay HTTP testing library for Ruby; review its licence before adopting it.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with VCR (Ruby) side by side.