Rambo is a gem that generates API contract tests from API docs in RAML.
You can install Rambo using:
gem install rambo
group :development, :test do
gem 'rambo', '~> 0.0.1'
end
rambo foobar.raml
spec/contract
directory, a spec/spec_helper.rb
file if they don't exist, and will create a spec/contract/foobar_spec.rb
file. The latter will overwrite any existing spec file by the same name. This is intentional behavior and will not change in future versions.
Rambo is being developed to test APIs complying with standard REST practices. Mileage may vary with other architectures, but I'm happy to consider pull requests.
Rambo is a new project and any contributions are much appreciated. All pull requests should include comprehensive test coverage and, where appropriate, documentation. If you're not sure where to get started, contact me through Github and I'll be glad to chat.
Additional information for contributors is available in the wiki. Beginning or first-time contributors are welcome and encouraged!
- RAML homepage
- Roy Fielding's dissertation describing Representational State Transfer (REST) architecture
- RESTful Web Services, by Leonard Richardson & Sam Ruby
- Martin Fowler on testing microservices