Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. We're looking for more maintainers. If you'd like to help maintain a well-used gem please spend some time reviewing pull requests, issues, or participating in discussions. VCR will replay the response from iana.org when the HTTP request is made. This test is now fast (no real HTTP requests are made anymore), deterministic (the test will continue to pass, even if you are offline, or iana.org goes down for maintenance) and accurate (the response will contain the same headers and body you get from a real request). You can use a different cassette library directory (e.g., "test/vcr_cassettes"). The recorded requests and responses are stored on disk in a serialization format of your choice (currently YAML and JSON are built in, and you can easily implement your own custom serializer) and can easily be inspected and edited.

Features

  • Automatically records and replays your HTTP interactions with minimal setup/configuration code
  • Supports and works with the HTTP stubbing facilities of multiple libraries
  • Supports multiple HTTP libraries
  • Request matching is configurable based on HTTP method, URI, host, path, body and headers, or you can easily implement a custom request matcher to handle any need
  • The same request can receive different responses in different tests--just use different cassettes
  • Dynamic responses are supported using ERB

Project Samples

Project Activity

See All Activity >

Follow vcr

vcr Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of vcr!

Additional Project Details

Programming Language

Ruby

Related Categories

Ruby Software Testing Tool, Ruby JSON Serialization Libraries

Registered

2021-10-22