readme.md

βetamax

Betamax is a tool for mocking external HTTP resources such as web services and REST APIs in your tests. The project was inspired by the VCR library for Ruby.

Betamax is written in Java and is compatible with tests written using JUnit or Spock for applications written in any JVM language.

Usage

Record

Add a @Rule RecorderRule property to your test and annotate test methods with @Betamax. The first time the test runs any HTTP traffic is recorded to tape.

Playback

Future test runs replay responses from tape without traffic going to the real target. No more 3rd party downtime or rate limits breaking your tests. You can even run your tests offline! Insert different tapes to stub different responses.

Customize

Tapes are just YAML files so you can edit them with a text editor, commit to source control, share with your team & use on continuous integration. An example tape file can be found here.