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.
@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.
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.
Full documentation can be found on Betamax's home page.
The current stable version of Betamax is 1.1.2 which is available from Maven Central.
Development versions are available from Sonatype.
Betamax's tests run on Travis CI.
Please get in touch if you have any feedback. You can raise defects and feature requests via GitHub issues.
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.