WCF Service Testing With soapUI

      2 Comments on WCF Service Testing With soapUI

I tried WCFStorm but there was a big bug? that I couldn’t get resolved. Or maybe it is a feature. Either way, it wasn’t gonna work for my testing purposes.

I looked around and found a series of articles on using soapUI to test your services.

Here’s the list of them:

Marcusoft.net Article 1
Marcusoft.net Article 2
Marcusoft.net Article 3

Once I read up on the tool, I thought I could dive right in. The first article talks about setting up your soapUI service by pointing it at your WSDL. Now if you have just started with WCF services, you are probably thinking, “How do I get the WSDL from my WCF service?”

First, I tried using svcutil.exe (available from the VS command prompt) and pointing it at my service, like so:


svcutil /t:metadata http://myhost/_vti_bin/SharePoint.Services/ProductionScheduleService.svc/mex

My service uses the MultipleBaseAddressBasicHttpBindingServiceHostFactory. Additionally, I set my service implementation to use the XMLSerializer by using the [XmlSerializerFormat] decoration on the class implementing the service interface (in this case ProductionScheduleService). Go here for a full explanation of why. My main motivator was because of the opt-out nature of the XMLSerializer.

You may recognize the s95/B2MML nature of the service I’m providing. Using WCF services allows us to have nested/combination WSDL by default, and so svcutil will do whatever the service does. In this case, my call to svcutil resulted in 2 WSDL files and 3 XSD files.

So instead I pointed soapUI directly at the service:

Create soapUI project

Once this was done, I used this article to setup an automated test. Really brilliant stuff here, unfortunately my Groovy coding skills are NIL. But by following along with this basic example, I now have a nice automated test that will make a Submit call, check that the record exists, then make a delete call and verify that it is gone. Brilliant!

EP-37-F001
Creative Commons License photo credit: johanoomen

2 comments on “WCF Service Testing With soapUI

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.