How to cover Silverlight code with dotCover

Skip to end of metadata
Go to start of metadata

There are several considerations to keep in mind:

  1. Silverlight code is executed in web browser.
  2. Silverlight runtime is started once for all browsers of the one type.
  3. DotCover will start or restart the browser.
  4. Only silverlight 4.0 and higher runtime is supported. (Previous versions of silverlight runtime don't support profiling API).
    Make sure that Silverlight 4 developer runtime is installed. You can download it from Silverlight site (direct link)

    Because of all that considerations recommended workflow is:

  1. Start website with silverlight in VS development server or in IIS or even deploy to other webserver
  2. Run dotCover->Profile Application.
  3. Fill the url (example file:///D:/Development/dotCover10/Test/Data/ColorPickerSilverlight/ColorPicker/Bin/Debug/TestPage.html)
  4. Fill the path to pdb folder (Press small Arrow down button to show additional options. Press "Edit symbol search policy..." button, and fill search path by the path to your dll and pdb folder)
  5. Press OK to start.
  6. Exercise your Silverlight application.
  7. Press "Get snapshot". We are done. 

Known issues:

1. If you never press Get Snapshot, then you will not get anything.

2. If you get zero coverage, then possibly you made a mistake in step 4.

Happy profiling

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.