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
Get Advanced Threat Protection for Your Azure Workloads Icon
Get Advanced Threat Protection for Your Azure Workloads

FortiGate NGFW on Azure Enables You to Protect Your Workloads Beyond Basic Azure Security Services

FortiGate NGFW identifies and stops advanced threats with powerful application control, malware protection, web filtering, antivirus, and IPS technology. As the attack surface expands, FortiGate provides integrated and automated protection against emerging and sophisticated threats while securing hybrid or multi-cloud environments. Deploy today in Azure Marketplace.
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