talira

Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

source availableHippocratic-2.1self-hostablefree

VCR records the real HTTP requests a Ruby test suite makes the first time it runs, saves them as cassette files, and replays them on later runs, so tests are fast, deterministic and don't need the network, while still using real responses. It hooks into WebMock, Typhoeus, Faraday or Excon, and can filter sensitive data out of cassettes. Its licence file is the Hippocratic License 2.1, not an OSI-approved open source licence; the gem's metadata lists both Hippocratic-2.1 and MIT. The maintainers are looking for more maintainers.

Problems it solves

  • record real API responses once and replay them in my Ruby tests
  • tests against a third-party API are slow and fail when the API is down
  • writing HTTP stubs by hand for every endpoint is tedious and drifts from reality
  • run the test suite offline on a plane
  • keep API keys out of recorded test fixtures

Features

  • cassette recording and replay
  • hooks into WebMock, Typhoeus, Faraday and Excon
  • sensitive data filtering

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what VCR does.

  1. WebMock Library for stubbing and setting expectations on HTTP requests in Ruby.
  2. Puffing Billy A rewriting web proxy for testing interactions between your browser and external sites

Compare VCR with the top 3