Click here to Skip to main content
Click here to Skip to main content

Different tools to unit test your WCF services

, 8 Jan 2011
Rate this:
Please Sign up or sign in to vote.
Different tools to unit test your WCF services
A programmer's duty doesn't get over by just writing the code. It gets completed when you test each part of the program & make sure that the individual parts are correctly developed. I am adding some different tools details herewith which will help you to test your WCF services.
 
There is a tool that Microsoft ships with Visual Studio called WCF Test Client(WcfTestClient.exe) which 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 does 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Anupama Roy
Software Developer (Senior) Dell
India India
I am a .Net developer working on C#,Asp.net,WCF,WF etc.I would like to utilize this space to share whatever I have come across so far working in .Net so that you can also learn & explore.
 
I hope you find these posts useful.I’d love to hear from you,so please post in your comments/feedback.
 
Visit my blog http://dotnetforyou.wordpress.com/ for more technical articles:

Comments and Discussions

 
GeneralMy vote is 4 PinmemberAshish Ramteke23-Oct-13 17:28 
QuestionFor REST services, you should add WcfStorm.REST Pinmemberpogiman22-Aug-12 23:14 
GeneralReason for my vote of 5 Good links Miss Pinmvpthatraja1-Feb-11 4:04 
GeneralThank you Sandeep. PinmemberAnupama Roy8-Jan-11 7:00 
GeneralReason for my vote of 5 Should be helpful! PinmvpSandeep Mewara8-Jan-11 6:59 
GeneralSounds and looks good! :) PinmvpSandeep Mewara8-Jan-11 6:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 8 Jan 2011
Article Copyright 2011 by Anupama Roy
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid