Testing WCF Service is very easy. Read this article

Posted by in WCF category on for Beginner level | Points: 250 | Views : 27766 red flag
Rating: 3 out of 5  
 1 vote(s)

MS has provided many tools which developers usually tend to forget or didn't get a chance to use them. This article is to let all our developers to use one such tool.


In My previous article we saw how to create a simple WCF service and test it using a console application. In this article we will discuss on how to use a predefined client application to test the service.

Windows Communication Foundation (WCF) Test Client (wcftestclient.exe) is one of the best GUI tool supplied by MS to test the WCF services starting from loading the service, passing inputs to the service and also view all the responses sent by the services.  The best thing about this tool is we don’t need to create any client application to test our services.

Step by step process to use the wcfclient.exe tool.

Step1. Create a WCF service

Step2.  Now it’s time to test our service. Instead of creating a console application or a client application to test the service we will use the predefined tool wcftestclient.exe.

Step3. Open visual studio command prompt and type wcftestclient and click enter.

Step4. On clicking enter key, we get a GUI application of the WCF Test Client

Step5. Select File->Add Service and type the service endpoint url as address and click ok.

We get as below

Step6.  Double click on Greeting Method

Step7. Now pass the value and click on Invoke button and you will find the response below.

Isn't it simple ..

Hope you all like this article.


You all saw how simple it is to test our WCF service. Hope you all will use this tool going forward. 

Page copy protected against web site content infringement by Copyscape

About the Author

Full Name: Madhu Rokkam
Member Level: Bronze
Member Status: Member,MVP
Member Since: 1/13/2011 3:13:20 PM
Country: India
Thanks and Regards Madhu

Login to vote for this post.

Comments or Responses

Posted by: Vuyiswamb on: 2/13/2011 | Points: 25
Nice Article, In fact , i have a shortcup to the Wcftestclient, you must add in your article that the Tester does not allow Dataset , that means you can test a Dataset , but it will tell you that the test is good or not.

Thank you for posting at Dotfunda

Vuyiswa Maseko

Posted by: Rajesh.gour on: 2/14/2011 | Points: 25
Nice article :)
Posted by: Madhu.b.rokkam on: 2/14/2011 | Points: 25
Thanks Vuyiswamb and Rajesh

Login to post response

Comment using Facebook(Author doesn't get notification)