views:

177

answers:

2

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.

+5  A: 

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!

Byron Whitlock
wish I could accept two answers....
Jared
+3  A: 

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,

http://jakarta.apache.org/jmeter/usermanual/build-ws-test-plan.html

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

ZZ Coder
+1 neat, never used that before. very cool.
Byron Whitlock