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.