Giter Site home page Giter Site logo

tddmonkey / betamax Goto Github PK

View Code? Open in Web Editor NEW

This project forked from betamaxteam/betamax

0.0 1.0 0.0 60.14 MB

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.

Home Page: http://freeside.co/betamax

License: Apache License 2.0

betamax's Introduction

β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.

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.

Full documentation

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

Project status

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

Add 'co.freeside:betamax:1.1.2' 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.

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.

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.

betamax's People

Contributors

cowboygneox avatar dkowis avatar erdi avatar froots avatar georgecodes avatar jlecount-okta avatar lhotari avatar nobusue avatar pksandeep avatar rhart avatar robfletcher avatar rschmitt avatar vorburger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.