locked
Unit testing and code coverage RRS feed

  • Question

  •  I have just started unit testing of my silverlight application.  I am using the Microsoft.Silverlight.Testing, Microsoft.Silverlight.Testing.Framework, and the Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight dlls.

     Does anyone know of a way to get code coverage results from my tests?  

     

    Thursday, September 4, 2008 3:12 PM

Answers

  • Silverlight Testing dlls are also available for Silverlight 2 Beta2 too. I'm sure about that since I was using those dlls for Silverlight-version of Unity. I don't think it provides the code coverage result but you will get the test result on browser once you run the test.. If you like to see the sample, please take a look at SLUnity post in my blog or Unity Contrib from Codeplex.
    Thursday, September 4, 2008 10:28 PM

All replies

  • Hi, I don't have answer for your quesition. But I'd like to know where did you download Microsoft.Silverlight.Testing/Microsoft.Silverlight.Testing.Framework dlls? I saw the Testing dlls are only available for Silverlight 2 beta1 controls.  Can that still work with beta2 controls?

     

     

     

    Thursday, September 4, 2008 4:47 PM
  •  Here is the article I used to setup my tests:

    http://www.jeff.wilcox.name/2008/03/31/silverlight2-unit-testing/#option2

     Here is a link to the downloads (I got it from the link above):

    http://www.microsoft.com/downloads/details.aspx?FamilyId=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&displaylang=en

    It seems to be working so far.  I have only written a couple of tests, but no issues so far.  I am running Beta 2.

     


    Thursday, September 4, 2008 4:57 PM
  • Good to know it's still working in beta2. I read the article too, but I was afraid the dlls won't work for controls in beta2, so I did not download it. Now I can give it a try.

     

    Thursday, September 4, 2008 5:09 PM
  • Silverlight Testing dlls are also available for Silverlight 2 Beta2 too. I'm sure about that since I was using those dlls for Silverlight-version of Unity. I don't think it provides the code coverage result but you will get the test result on browser once you run the test.. If you like to see the sample, please take a look at SLUnity post in my blog or Unity Contrib from Codeplex.
    Thursday, September 4, 2008 10:28 PM
  • Yes, I found the Silverlight Testing dlls and test project/class templates for beta2 in Jeff Wilcox's later blog:

    http://www.jeff.wilcox.name/2008/06/11/silverlight-unit-test-framework-download-for-silverlight-2-beta-2/


    Friday, September 5, 2008 9:48 AM
  • The unit test framework can now also be found on the MSDN Code Gallery site at http://code.msdn.microsoft.com/silverlightut/.

    Tuesday, September 16, 2008 1:05 AM
  •  When will the dlls for the new Silverlight release be available?  If it is already available, do you have a link?

    Monday, September 29, 2008 3:33 PM
  • They should be up on that MSDN Code Gallery site by the end of the day.

    Monday, September 29, 2008 3:50 PM
  • Updated unit test framework download for the release candidate: http://code.msdn.microsoft.com/silverlightut/
    Breaking changes: http://www.jeff.wilcox.name/unit-testing-rc0-changes/

    Tuesday, September 30, 2008 3:25 AM
  • Great!  Thanks.

    Tuesday, September 30, 2008 9:29 AM
  •  Any suggestions on creating a MouseEventArgs object since the constructor is now private?  I have a method I want to unit test, but the method requires an MouseEventArgs object that is not null.

     

    BTW, love the UI updates.

    Tuesday, September 30, 2008 2:24 PM
  • You can use the new SilverUnit framework for Unit testing Silverlight. You can click the links for more info...

    Tuesday, April 14, 2009 6:01 AM
  • The links don't work

    Thursday, September 17, 2009 8:06 AM