views:

1312

answers:

5

I'm looking for a framework or tool for testing RESTful services. This seems like it shouldn't be hard, but the tools that I've found thus far assume things about my service that they probably shouldn't.

What would be great is something that could make a request (like, HTTP POST) and then compare the result with an expected result. I know that you can string together a few tools to do this but there has to be something easier since HTTP is super basic.

+1  A: 

I really like Shoulda (http://www.thoughtbot.com/projects/shoulda)

They had a really interesting discussion on their bug tracker about why they removed the 'should_be_restful' macro they had: (http://thoughtbot.lighthouseapp.com/projects/5807/tickets/78-deprecate-should_be_restful)

Kevin Davis
A: 

Python's urllib2 and unittest are what we use to test RESTful services.

S.Lott
A: 

I have heard about SoapUI that is very good, but never tried it. They recently added support for RESTful API http://www.soapui.org/

I have also heard about iTKO: http://www.itko.com/

We are using HP Service Test, no built in REST support, but general HTTP support + built in support for manipulating XMLs.

LiorH
I could not find a way to automate soapUI. It should be possible to update the test cases as the web service evolves. This works well for WSDL-based service definitions, but with REST it is always necessary to reload the service definitions and add the test cases again (manually).
Kariem
A: 

With Fiddler (free as in beer, provided my Microsoft) you can easily monitor what's going on under the hood of your HTTP traffic.

You can set breakpoints for certain HTTP requests, you can have it mimic the web server, and it can just function as a proxy, while showing you what's happening. You can also contruct requests in the tool and send that to mimic a client.

I can't live without it when I do any HTTP programming.

http://www.fiddlertool.com/fiddler/

Wouter van Nifterick
A: 

Fitnesse with the Rest fixture is what you want. You can maintain a suite of tests, point them to different environments, and run them on demand, or integrate it with a build server.

Brian