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
Top-Rated Free CRM Software Icon
Top-Rated Free CRM Software

216,000+ customers in over 135 countries grow their businesses with HubSpot

HubSpot is an AI-powered customer platform with all the software, integrations, and resources you need to connect your marketing, sales, and customer service. HubSpot's connected platform enables you to grow your business faster by focusing on what matters most: your customers.
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