Using the WCF Test Client to Test Your Workflow Service

If you need a quick and simple way to manually test your WorkflowService the WCF Test Client makes it simple but there are a few tips that will make your life much easier.

Tip: Add the WCF Test Client to your Visual Studio Tools menu

  1. Select Tools / External Tools
  2. Add the WCF Test Client tool.  The path is C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe


Tip: Get the URI for your service by viewing in the browser

The WCF Test Client will ask for the URI of your service.  The simplest way to get it is to

  1. Right click on your .XAMLX file
  2. Select View in Browser
  3. Copy the URI from the browser window


Tip: Expand the Nullable Type To Set It

When Visual Studio 2010 first came out, I was confused about how I could send a value to the default Workflow Service implementation which accepts a Nullable<int> as a parameter.


Just click on the drop down arrow and select System.Nullable<System.Int32>


Then click on the triangle just left of the int


Now you can enter a value. 

Of course, by now everyone has figured this out right?  Wrong… I still run into people who never realized they could do this.  Sad really because a tool like this should be… intuitive but in this case it just wasn’t so.

Tip: To Understand Your Workflow Service and the WorkflowServiceTrace behavior

If you are debugging your service in Visual Studio you can use the Microsoft.Activities WorkflowServiceTraceBehavior to see exactly what your service is up to.  For more information see How do I get Workflow Trace information to show in Visual Studio's Debug Window?