A Groovy record/playback proxy for testing applications that access external HTTP resources. Inspired by Ruby's VCR
Pull request Compare This branch is 718 commits behind betamaxteam:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
site @ b0c3363



A Groovy testing tool inspired by Ruby's VCR. Betamax can record and play back HTTP interactions made by your app so that your tests can run without any real HTTP traffic going to external URLs. The first time a test is run any HTTP traffic is recorded to a tape and subsequent runs will play back the HTTP response without really connecting to the external endpoint.

Tapes are stored to disk as YAML files and can be modified (or even created) by hand and committed to your project's source control repository so that other members of the team can use them when running tests. Different tests can use different tapes to simulate varying responses from external endpoints. Each tape can hold multiple request/response interactions but each must (currently) have a unique request method and URI.

An example tape file can be found here.

Full documentation

Full documentation can be found on Betamax's home page.

Project status

The current stable version of Betamax is 1.0 which is available from Maven Central.

Development versions are available from Sonatype.

Please get in touch if you have any feedback. You can raise defects and feature requests via GitHub issues.


To use Betamax you just need to annotate your JUnit test or Spock specifications with @Betamax(tape="tape name") and include a betamax.Recorder Rule.