We use the test endpoint of...
https://jsonplaceholder.typicode.com"
Its a cool endpoint that allows you to create, retrieve and update posts. At some point I will update this to allow you to use something like Sinatra or another local API service.
This project's underlying API test tool is a great little gem called 'airbourne', which can be found here...
https://github.com/brooklynDev/airborne
- You are not 100% new to Ruby or RSpec.
- You have some general idea as to what an API is and does.
- A basic framework for testing APIs, using Ruby.
- An idea of how a framework can be setup to handle a real world API endpoint.
- A good example to see RSpec expectations in action.
- An opportunity to see how you can use other ruby gems to build test data models
- An insight in what approach to take when verisfying json data and endpoint performance
- An all-in-one super duper framework.
- Something that you can 100% copy over for any app (though I suspect you'd be able to use most, as is).
- No multi language / locale support...yet.
Drop me an email, [email protected] for any comments, suggestions, etc.
- Use of the 'faker' gem to create test data and models
- Implementation of timings, to allow you to verify API SLAs, etc.
- Documentation updates :D
I like to use RVM to get my house in order...
- cd into ruby-api-testing-framework-example/
- rvm use ruby-2.3.0
- rvm gemset create ruby-api-testing-framework-example
- rvm gemset use ruby-api-testing-framework-example
- gem install nokogiri -v '1.8.1'
- bundle install
After cd'ing into the 'ruby-api-testing-framework-example' directory...
rspec spec --format documentation