views:

393

answers:

3

I want to test my RESTful applications directly via HTTP and I am looking for tools that can help me with that task. Basically I am looking for an easy wrapper for HTTP requests that can submit e.g. HTML forms or serialized resources as JSON or XML.

It would be great if there is a way to verify if the service is actually following REST architectural guidelines (statelessness, URIs, content negotiation etc.), too.

Being able to use it with JUnit would be a convenient bonus. Do you know about any libraries that could help me with what I want to do (and that are a little more than just a simple http client)?

+1  A: 

Maybe Selenium can be of some help, but surely not entirely.

Gabriel Ščerbák
Why not entirely?
Avi Flax
Selenium as far as I know has no direct support for JSON and XML, it is good for browser level testing - user interaction testing and even than, not everything works (AJAX).Also one thing I especially don't like about Selenium (don't get me wrong I like using Selenium in overall) is the Selenium IDE, which should help, however it just creates more problems by generating very crappy code (e.g. no JUnit4 support) and behaves differently than the Server (try out the variables without a patch).
Gabriel Ščerbák
+1  A: 

See if rest-client is of any help.

Vishal
+1  A: 

I have used the Poster add-on for Firefox.

Arthur