When testing Silver Light applications, we frequently run into dealing with non-Html content types. This is because most of the Silver Light applications use WCF RIA web services. Typically, this will be a binary format called MSBin1. Also, Silver Light applications may use other content types such as JSON, SOAP and REST to communicate with server. In general there is significantly greater use of Web Services and JSON in today's web applications.

To test these applications under various scenarios we really need to edit, parameterize, extract values from responses and data drive these messages rather than simply playing back the same messages that are captured by Web Test recorder.

There is currently no editing capability for MSBin1 content in Web Test and JSON messages are difficult to read or edit. Also, in general Xml needs better editing capabilities than simple text editor that we have currently in Web Test.

Luckily there is a good set of extensibility points in Web Test for providing additional support for these content types. There are a number of plugins available to be downloaded from Code Plex project Web and Load Test Plugins for Visual Studio Team Test

The Web Test Plugins for Web Service Messages leverage these extensibility points to provide the following functionality for all these content types:

  1. Editor for Request body: The plugins provide a tree view of the structured data which allows easy editing, parameterization and data binding.
  2. XPath based Extraction and Validation Rules: XPath is a powerful tool to extract required data from Xml. This provides an additional capability for Xml and JSON based messages which can use existing extraction and validation rules that work on text. But for Msbin1, none of the existing rules work, because it is binary. So, these plugins are only way to extract and validate data from MSbin1 content types.
  3. Data Driving for MSBin1: Using these plugins, you can parameterize and data drive MSBin1 content.
  4. Additional tab in Web Test results that shows Request and Response in hierarchical view side by side. Using this user can add extraction/validation rules on response messages and parameterize requests.

When installed, the following components will be added to the user's file system:





Visual Studio Addin - Additional tab in Web Test Result

WebServicePluginFor WebTestResultTab.AddIn

WebTest.WebService. Plugin.ResultTab.dll

<User Documents>\Visual Studio 2010\Addins

Adds a new tab called "Web Service" into Web Test results

Msbin1MessageEditor (IBinaryHttpBodyEditorPlugin)

XmlMessageEditor (IStringHttpBodyEditorPlugin)

WebServicePostRecording (WebTestRecorderPlugin)

WebTest.WebService. Plugin.MessageEditors.dll

~Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies \WebTestPlugins

WebTest Editor Plugins -  Request editors for various content types

XPathExtractionRule (ExtractionRule)

XPathValidationRule (ValidationRule)

WebServicePlugin (WebTestPlugin)

WebTest.WebService. Plugin.Runtime.dll

~Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies

Runtime assembly -contains extraction/validation rules, data binding for binary content types.

All three assemblies work together, so all of them need to be present when authoring Web Test. Only runtime assembly (WebTest.WebService. Plugin.Runtime.dll) is required to run Web Test.

Read more about the plugins...

Download the plugins (WebServicePlugins.zip) from Code Plex and install under Visual Studio 2010 Ultimate and let me know your feedback.