views:

71

answers:

2

What is the best way to test SOA services? Should I write my own tests using WCF or should I be using a testing framework such as SOAPUI. What are the limitations to each method and are there better tools?

+4  A: 

You definitely should be using SoapUI. Especially in a mixed environment. i.e. in a mixed environment (java, delphi, WCF, etc..) SoapUI will be your common tool that can confirm what works and what doesn't. It can also be used to set up mock services so you can test against a service that isn't yet built. i.e. from the WSDL you can build something in minutes that will log requests and give responses. That's hugely beneficial. Down the road, you'll be able to verify what works and what doesn't using the common tool, rather than fighting about "works here in technology x, so it must be a problem at YOUR end".

Look into the mockservices demo where they show how to do simple canned responses based on xpath. Very simple, and effective. You can send a response and return a variety of predictable responses. for example, you send updates for emps Tom, Dick, Harry. Configure your SoapUI mockservice to return success for Tom, soft error for Dick, catastrophic error for Harry.

IMO, the best place to start before building any web service is to build a mockservice in SoapUI. Then you can test with sample payloads and see if everybody is seeing what they expect. i.e. HR sends a new employee to Payroll, using the WSDL that everyone agreed to. The Payroll dev hasn't even coded his part yet, but by looking at the transaction in SoapUI, he sees that the EmpID format is "totally not going to work on our end". Now HR can make a change. The Payroll dev also sees that the Termination Dates are 12/31/1889 for employees that haven't been fired yet. He expected ''. Now a discussion can ensue between the devs and analysts, instead of later on during integration or startup, when the discussion would likely involve several layers of PMs, "situation leads", etc..

Chris Thornton
Well I don't really need mockservices. All the services have been made and I am look more to develop tools for testers not developers to preform regression testing with their own datasets. Is soapUI suited for that? I see that soapUI pro has form based input. Does that mean I can have a form pop up at the beginning were a user can select a file to use as a datasource?
Reflux
@Reflux, the form is another option when submitting a query. instead of raw XML, it'll give you a form, based on the XML, where you can type data into fields. ex: LastName:[ ]FirstName: [ ]
Chris Thornton
+2  A: 

I suggest you also take a look of the brand new SO-Aware from Tellago Studios; http://www.tellagostudios.com/ . One of the features is automatic service testing.

larsw
Looks promising hopefully it's not too expensive to license. Right now I need to wait for IT to install IIS before I can actually test the express edition. Have you used SO-Aware? What are your thoughts? Also is SO-Aware hosting my services? I don't want it to replace my existing services server.
Reflux
No, So-Aware will not host your services - it's a service registry helping you to decouple your clients from your services.
larsw