Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are tools and best practices for testing web services?

I'm about to start work on a large project that will involve providing a significant number of web services.

We'll be using the Java platform, so, of course, we'll be making heavy use of JUnit, Hudson, etc. (although I'm not sure that matters at all.)

We're looking for a set of best practices and/or tools for testing the web services. We'll have several goals in mind:

  1. Obviously, we need to prove that the services behave correctly. This means issuing web service calls, receiving the responses (checking them for correctness), and then, probably issuing another web service call to ensure that the system is in the new state that we want it to be in post-original call (and, obviously, checking that response for correctness.)

  2. We'll need to collect response times.

  3. We must be able to execute the test cases automatically (jUnit style, but against a running system, not against individual code units.)

  4. It would be incredibly cool if non-developers (technical business users) could "author" the test cases. They aren't XML experts (and will never be,) so expecting them to create the XML files is not realistic. But they are subject matter experts, so giving them a "form" to fill out that would generate the XML file is realistic. However; there will likely be far too many disparate services for us to custom-build each of these "forms."

Any thoughts, best practices, or lessons learned would be appreciated.

like image 750
Jared Avatar asked Sep 18 '09 20:09

Jared


2 Answers

SOAPUI This is the best open source tool for testing web services. You can create unit tests, it even has a form interface that will read the wsdl and create a form to invoke the services.

Fiddler You will need to look at the request and responses on the wire. This is crucial since most toolkits don't make it easy to see what exactly is coming back and forth.

XMLSPY This is a paid program, but it has very very clean interface. IT make it easy to debug the xml files and will let you invoke services. It reformat even malformed XML and is a lifesaver in many situations. If you can afford it GET IT!

like image 126
Byron Whitlock Avatar answered Nov 18 '22 14:11

Byron Whitlock


We use SOAPUI to do the functional testing initially. However, SOAPUI is not good for regression and load testing.

Next step, we load the XML into JMeter.

It can drive load from multiple machines and we can easily stress our servers to the limits.

like image 44
ZZ Coder Avatar answered Nov 18 '22 13:11

ZZ Coder