Windows Communication Foundation (WCF) Testing

CloudTest supports testing web sites and web applications that use the Windows Communication Foundation (WCF) as their communication protocol. CloudTest handles the encoding (for outgoing messages) and decoding (for incoming responses) of WCF’s .NET binary XML layer, and then presents plain text in both message responses and in test results within CloudTest.

The Recording Editor supports WCF applications that use .NET binary XML. When recording from a WCF-based application, the Recording Editor will automatically decode the binary XML and then display the plain-text version. Recording from WCF-based applications that do not use binary XML was already possible since only plain text was involved in those cases. Once this target exists, you can record WCF-based binary sites using the Recording Editor in the same manner as you would with any other site.

To get started, use the following steps:

How to

  1. Create the WCF-based Target
    1. In the Central list, select Targets and then click New.
    2. The Target Definition Wizard appears. Click Next. The Start by Selecting a Target Type step appears.
    3. Choose SOAP with a WSDL URL and then click Next.

      The Define the WSDL Target step appears.

    4. Enter a Target Name and the WSDL URL for the WCF service. If authentication is required for the URL, provide it in the given fields.
      Note: The Target Name will be required when you convert your WCF-based recording to a test clip.
    5. Once you have supplied the target information, click Next. A summary screen appears to display the data you entered. Review this information and click Finish when you're ready.
    6. Repeat these steps for any additional WSDL URLs required to conduct your test.

  2. Convert the WCF-based Recording to a Test Clip
    You must create a recording containing all the SOAP operations that you wish to use, and then convert that recording to a clip. You cannot create a new WCF test clip "from scratch" (e.g. manually).
    1. Start your CloudTest Conductor.
    2. In the Central list, click HTTP(S) Recording and then click New to start a new recording of your WCF-based site.
    3. Open the WCF site in your web browser in a second window and then return to CloudTest to click Record.
    4. Apply any filtering to the recording that you’d like and when ready, click Convert to a Clip. The Create a Test Clip from a Recording Wizard appears.
    5. Enter a clip name and select a clip timing type (use Sequenced if you’re unsure) and then click Next. The Bursts and Think Times page appears.The Match Targets to Recording Messages page appears.
    6. Wait for the target(s) that you created in the previous set of steps to be auto-selected from the Available Targets list and placed into the Selected Targets list and then click Next.
    7. The Create Clip summary page appears. Review the settings and then click Next again to create the test clip. The test clip is created and the Summary page appears.In the Next Steps section, choose Go to the Clip Editor in order to inspect messages in the WCF-based test clip.
  3. Editing and Playing a WCF-based Message in the Clip Editor
    1. When viewing a WCF test clip, you must use the XML view, not the Form view. This will be enabled by default when you open a WCF clip.
    2. With the WCF-based test clip open in the Clip Editor, select a message that you’d like to edit and then double-click it.

      The selected message is opened in the sub-pane with the tab title Selected: <MessageName> active.

      The decoded content is presented as plain text just as with any other message.

    3. You can edit the message here by navigating through the nodes in the sub-pane tree.
    4. Optionally, add a new message to the test clip. To add a new message, you must copy and paste an existing message of the same operation and use that as a starting point. You cannot drag new WCF messages up from the list of operations in the Clip Builder.
      Note: You can modify the XML in this view.
    5. Play the message by clicking the Play button on the sub-pane toolbar. The tab will switch to Results when the response is received.

What you should see

When you play a message in the Clip Editor, if it is using binary XML, CloudTest will automatically encode it before sending the request.

Similarly, message responses are decoded before display in the Message Editor sub-pane of the Clip Editor. The decoded response will be displayed in results (such as in the Result Details widget).