Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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.
CSS Groovy Java Shell
tree: 7286f9603d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config/codenarc
examples/grails-betamax
gradle/wrapper
src
.gitignore
.travis.yml
LICENSE
build.gradle
gradlew
gradlew.bat
readme.md

readme.md

βetamax Build Status

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.

Record

Annotate your test with @Betamax. The first time it runs HTTP traffic is recorded to tape.

Playback

Future test runs replay responses from tape. Insert different tapes to stub different responses.

Customize

Edit tape files with a text editor, commit to source control, share with your team & use on continuous integration.

Full documentation

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

Project status

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

Add 'co.freeside:betamax:1.1' as a test dependency to your Gradle, Ivy, Grails or Maven project (or anything that can use Maven repositories).

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.

Usage

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

Notes on running tests from inside IntelliJ IDEA

Go to Settings -> Compiler and ensure that *.keystore appears in the Resource patterns otherwise IDEA will not make the SSL keystore available on the classpath when tests run.

Something went wrong with that request. Please try again.