

Ask HN: How do you do your RESTful API automated testing? - webmaven

Bonus points if your tool, advice, or method applies well to Hypermedia APIs as well as simpler CRUD APIs.
======
webmaven
I found this approach to doing BDD for an API:

[https://bitbucket.org/tcorbettclark/rest-api-
blueprint/wiki/...](https://bitbucket.org/tcorbettclark/rest-api-
blueprint/wiki/AutomaticTesting)

------
johns
[https://www.runscope.com](https://www.runscope.com) (my company)

Can extract links to follow. We'll have more info soon specific to hypermedia.

~~~
webmaven
Interesting, thanks!

------
webmaven
A related post:
[https://news.ycombinator.com/item?id=8376813](https://news.ycombinator.com/item?id=8376813)

------
benologist
I just use asynchronous tests? Is there more to it?

~~~
webmaven
Well, 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
I just make requests:

[https://github.com/playtomic/gameapi-
as3/blob/master/src/com...](https://github.com/playtomic/gameapi-
as3/blob/master/src/com/playtomic/as3/TestLeaderboards.as)

plus complemented by tests on the server as well:

[https://github.com/playtomic/apiserver/blob/master/tests/lea...](https://github.com/playtomic/apiserver/blob/master/tests/leaderboards.js)

and generally test functionality + output format.

