Simulate WCF Call using WCF Test Client

Often not, you have a Windows Communication Foundation (WCF) service ready for call but do not have a ready service controller or UI to execute testing on it.

Scenario: While I was working on developing front-end of the system that calls a fully developed back-end UI, my software tester requested for assistance in testing the back-end service. (Back then, it was a parallel ongoing work where once software developer completed the back-end service, software developer will proceed with front-end while software tester will do testing on the back-end service)

In order to solve this issue, you just need to run WCF Test Client.

Method 1: Command Prompt

  1. Go to Start –> Visual Studio 2012 –> Visual Studio Tools –> Developer Command Prompt for VS2012
  2. Key in ‘wcftestclient’ without quotes.
  3. WCF Test Client will be shown.
Executing WCF Test Client from Developer Command Prompt
Executing WCF Test Client from Developer Command Prompt

[adrotate banner=”1″]

Method 2: Directory

  1. Alternatively you may go to the following directory:
    a. 64 bit OS: “C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDE”.
    b. 32 bit OS: “C:Program FilesMicrosoft Visual Studio 11.0Common7IDE”.
  2. Execute WcfTestClient.exe.
Executing WCF Test Client from directory
Executing WCF Test Client from directory

Now, WCFTestClient should be executed as like below figure.

WCF Test Client
WCF Test Client

Proceed and follow the instruction mentioned in the Start Page by adding your WCF Service.

Right Click --> Add Service
Right Click –> Add Service

Add your WCF Service URL and click OK. It should download the necessary service reference for you to call the service.

Add WCF Service URL
Add WCF Service URL

There you go.

1 thought on “Simulate WCF Call using WCF Test Client

  1. Its very helpful thank you, But having issue while adding service to WCF Rest Client .
    it show me Error: Cannot obtain Metadata

Leave a Reply