views:

40

answers:

1

Is there any way to get Code Coverage metrics for Silverlight 4? I have been trying to get this up and running for some time.

For a while there was code coverage in the Silverlight Unit Test Framework, but to my understanding it is now broken.

Any ideas on how I can pull off some code coverage metrics in my application?

+1  A: 

We use ncover for measuring code coverage for our Silverlight 3 code. We use nunit testing framework. We have found ncover to be very useful along with ncover explorer which precisely points out the section of code which isn't covered by unit tests. They have a free 21-day trial edition.

P.K
How are you able to use nUnit to test your Silverlight code?
zachary
http://greenicicleblog.com/2009/12/18/running-nunit-2-53-tests-for-silverlight/
P.K
I am confused doesn't this article tell you how to test nunit tests with the silverlight framework?
zachary
if the article confuses you, leave that...to use nunit to test in silverlight, do the following: edit your silverlight csproj file to add a reference to the nunit assemblies. Remember you can't do it using add reference dialog, you will have to do this by manually editing the silverlight csproj in a notepad.
P.K