Mock your HTTP responses to test your REST API
mocky.io
mocky.io
There was a service called requests.in or something that acted like httpbin, except it gave you a unique url to query against to view multiple requests over a session. Does anyone know where that went?
I plan to do some of that, as needed. Convenient.
Same ability to mock responses and errors, but everything is local. Check your responses into git and every developer is testing the same stuff, no reliance on a 3rd party
Makes for lightning fast automatic background testing.
Full disclosure: I'm the author.
I recommend this service for this kind of testing.
Build a good client library for your applications to use, mock the client library and don't worry about tests failing because of availability problems.
If Mocky could be ran onsite and had a nice API for easily generating mock responses, then I think it would be more useful.
@ajax.whenQuerying('someendpoint').respondWith(someData)
And internal to that system we have some components that understand the overall shape of our data model so someData can be a very small, simple object with just the data the test cares about and the internals flesh out the rest."[1]DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
Copyright (C) 2004 Sam Hocevar sam@hocevar.net"
http://www.flickr.com/photos/girliemac/6508102407/in/set-721...
The service makes a lot of sense otherwise.
<div>what</div><div>Not</div>this<ul id="list" data-list="f"><li class="first">one</li></ul>
"HTTP/1.1 500 Internal Server Error"
when that's not what I want.
A very similar offering released a week ago on github.