3 ms·
Ask HN: How do you do your RESTful API automated testing?
Bonus points if your tool, advice, or method applies well to Hypermedia APIs as well as simpler CRUD APIs.
- benologist 12y agoI just use asynchronous tests? Is there more to it?
- webmaven 12y agoWell, do you just use something like requests to make an HTTP call (or a series of them) and examine JSON or XML results (which seems tedious to me), or do you have a higher level library that understands resources, links, etc.?
- benologist 12y agoI just make requests: https://github.com/playtomic/gameapi-as3/blob/master/src/com/playtomic/as3/TestLeaderboards.as https://github.com/playtomic/gameapi-as3/blob/master/src/com... plus complemented by tests on the server as well: https://github.com/playtomic/apiserver/blob/master/tests/leaderboards.js https://github.com/playtomic/apiserver/blob/master/tests/lea... and generally test functionality + output format.
- webmaven 12y agoI found this approach to doing BDD for an API: https://bitbucket.org/tcorbettclark/rest-api-blueprint/wiki/AutomaticTesting https://bitbucket.org/tcorbettclark/rest-api-blueprint/wiki/...
- johns 12y agohttps://www.runscope.com https://www.runscope.com (my company) Can extract links to follow. We'll have more info soon specific to hypermedia.
- webmaven 12y agoInteresting, thanks!
- webmaven 12y agoA related post: https://news.ycombinator.com/item?id=8376813 https://news.ycombinator.com/item?id=8376813