An awesome library that records and replays HTTP interactions for unit tests

Cornell: record & replay mock server

When your application integrates with multiple web based services, end-to-end testing is crucial before deploying to production. Mocking is often a tedious task, it becomes even more tiresome when working with multiple APIs from multiple vendors.

vcrpy is an awesome library that records and replays HTTP interactions for unit tests. Its output is saved to reusable “cassette” files.

By wrapping vcrpy with Flask, Cornell provides a lightweight record and replay server that can be easily used during distributed system testing and simulate all HTTP traffic needed for your tests.

Basic Use Case

When you’re working with distributed systems, the test client entry point triggers a cascade of events that eventually send HTTP requests to an external server

68747470733a2f2f696d6775722e636f6d2f4f6c444e5469442e6a7067

With

 

 

 

To finish reading, please visit source site