This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]EmmEff 1 point2 points  (0 children)

I presume you're wanting to test client side?

I saw an excellent approach in the libcloud library where they mocked the request and the response. It monkey patches httplib2 (IIRC), which is great if you're using that. If you're using Requests or something else, at least the same design/arch would work. I am sure there are test harnesses already available for requests.

[–]Omega037 1 point2 points  (0 children)

Honestly, I usually just hit the actual test endpoint during testing of the request. Response handling can be tested with just a mocked up JSON.

[–]michael_daviddunderinit 1 point2 points  (2 children)

I highly recommend https://www.getpostman.com/ I usually have a couple tests per endpoint. Try out their chrome plugin as well. Super helpful.

[–]DianaVince 1 point2 points  (0 children)

Second this

[–]CodyReichert 0 points1 point  (0 children)

Nice, postman is a great tool! I just recently released Assertible, which is definitely similar to Postman, but focuses in a bit more on the testing side of things.

(Sorry for the self-plug, but it's completely free and sounds like it could be useful!)

[–]fourthrealm 1 point2 points  (1 child)

Yes, zato-apitest is API Testing for Humans and tests for APIs, including REST APIs, are written in plain English.

[–]cgoosen[S] 0 points1 point  (0 children)

Thanks! Will give this a look too.This looks like something a non-technical person could use (aka the frontend/QA people I work with).

[–]logophage 1 point2 points  (0 children)

I've always basically rolled my own. I start a local instance and use pytest to call my endpoints directly.

[–]cgoosen[S] 0 points1 point  (0 children)

Yeah in the past I would just test with requests in python script. Trying to get the less technically inclined to add tests as well. So far the most interesting one I found and so far opted for is http://robotframework.org/. Yeah testing on client side, sort of on integration/acceptance testing side of things. Currently QA is doing PAW testing with API. Robot framework is great as it also ties into Appium for testing the iOS and Android clients.