Posts Tagged ‘test WCF services’

It’s been few months since I have started working with wcf services &  I have already talked about the same topic, way to test wcf services in linkedin.I thought this is the best place to share it once again.

For testing WCF services,there is a tool that microsoft ships with visual studio called WCF Test Client(WcfTestClient.exe)

This can be found at the following location

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
More details on this can be found at

http://msdn.microsoft.com/en-us/library/bb552364.aspx .

A limitation I found with this is,only Soap endpoints which can expose metadata about itself (WSDL or Mex) can be invoked using this.

For Wcf REST services,One alternative you can try is to create the test client yourself in code using the ChannelFactory<T> class using the same contract used in the service(You will have to manually write a proxy as svcutil.exe do not support automatic proxy generation for REST services). Then use some network capture tool such as Fiddler (www.fiddlertool.com) to send requests to the service.

Though not all WCF tools are free,here are a few which you can try out.I have tried out SOAP Ui & SOA Cleaner for my services & seems to be good.

SoapUI can be found at : http://sourceforge.net/projects/soapui/files/

SOA Cleaner can be found at: http://xyrow.com/Home/Free

WCFStorm can be found at: http://www.wcfstorm.com/wcf/wcfstorm-lite.aspx 

One more useful way for developers to unit test WCF methods is to right click & generate test method.More details on this is available here

http://msdn.microsoft.com/en-us/library/ms182524(v=VS.90).aspx

Hope you find this information useful.If you have come across any other ways to test WCF services,please share.