RSS Feed for This PostCurrent Article

Web Service Mocking Tool

I have a WSDL file received from 3rd party. I generate the client code but the server is not ready yet. So how do I test my code ?

There are times that we need to test Web Service client that we have written by mocking up the Web Service response. There are many Web Service testing tools out there but not many can be used to test Web Service consumers.

As quoted from the website, WSUnit is a tool that can help you test Web Service consumers. It provides a predictable and repeatable simulation of a Web Service that is ideal for unit testing. It is also useful when developing web service consumers when the actual web service may not be avaliable due to your remote location or may not have been fully developed itself.

WSUnit is a simple Java servlet that listens on a port for HTTP requests. Based on the url and optionally the content of the request, WSUnit can be configured to return the contents different static files.

As what I noticed, WSUnit is not being updated for quite sometimes. I have tested it using Tomcat 6.x and Eclipse 3.x, and it still works.

The good thing is that WSUnit can provide a semi-dynamic output based on the request that I submit. In this case I can carry out more thorough testing on my Web Service client.

Well, this one should be a no stranger for most of the Web Service developers. soapUI has a feature called MockService that can be used to mock up the responses expected by a Web Service client. For details, refer to the website.

Trackback URL

Sorry, comments for this entry are closed at this time.