Silverlight and code coverage - silverlight

Is there any way to get code coverage numbers from Silverlight? Up until now it has been impossible. I was hoping with the new Visual Studio 2010 Service Pack or Silverlight 5 coming out that there might be a way.

Jeff Wilcox outlines how to get Code Coverage from the Silverlight Unit Test Framework on his blog at http://www.jeff.wilcox.name/2009/11/november-walkthrough/

Related

Code Coverage and Silverlight 4

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?
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.

how to setup VS 2010 to allow debugging of Silverlight 3 and Silverlight 4

I have some code which is in Silverlight 3. I am unable to move to SL4 at this time.
I would however like to use VS 2010 to do my SL 3 development... and SL4 development.
The idea of both runtimes coexisting on 1 machine i thought I heard Microsoft got
right this time in VS 2010.
is this correct?
if yes, then Where can I find the instructions how to set this up?
thanks for any help you can provide,
Sincerely,
J
Silverlight is not side-by-side. VS 2010 provides multi-targeting support for the full .NET framework, which is side-by-side, but NOT Silverlight.
There can only be one version of the Silverlight plugin and runtime on the machine.
That said, if you want to build code targeting one or the other, that is possible by checking in the Silverlight versions to your source enlistment. This post is a little outdated but provides an example for doing this for SL2 and SL3.

How to unit test Silverlight 3 Out-Of-Browser application?

How to unit test Silverlight 3 Out-Of-Browser application?
Roy Osherove has created an open source framework to test silverlight controls
It called SilverUnit and it uses Typemock in order to intercept .NET calls and fake their behaviour.
SilverUnit lets you test your controls using simple unit testing framework no browser required.
Seems like a good solution for what you're looking for.
Since you are into beta stuff (Silverlight 3), are you willing to consider using VS 2010?
If so, take a look at Mathew Aniyan's blog. He has lots of information on data driven Coded UI Tests.

What tools do I need to do Silverlight development?

I already own Visual Studio 2008 Team Version, and have an MSDN subscription...and I am an experienced ASP.Net developer.
What do I need to install to do Silverlight development, and can all of those tools be installed alongside my current "production" development machine (want to make sure there will not be any side effects).
I know I want to learn silverlight, but its not clear to me which tools are required and/or recommended in order to get started...
Thanks.
Download the Silverlight 2.0 SDK and Visual Studio 2008 Tools
Microsoft® Silverlight™ 2 Software Development Kit
Microsoft® Silverlight™ Tools for Visual Studio 2008 SP1
Check here for the links
http://www.microsoft.com/downloads/details.aspx?FamilyId=4E03409A-77F3-413F-B108-1243C243C4FE&displaylang=en
Another great resource is the original:
http://www.asp.net/downloads/
AND
http://silverlight.net/GetStarted/
Hope this helps:
Andrew :-)
This link has pretty much every thing you need.
If you're already comfortable with VS development, you can just develop Silverlight in VS by downloading the Microsoft Silverlight Tools for Visual Studio 2008.
If you're more of a designer than devloper, then Microsoft Expression Studio may be better for you.
Follow the steps here:-
http://silverlight.net/GetStarted/
I have no problems using this stuff side-by-side with my regular development
Silverlight.net is a good place to start. All the tools are finalized so you should be able to install all things silverlight and be fine.
I am also trying to get started with Silverlight development.
Here is how I was getting started.
1.) To set up development environment: Getting started with Silverlight
2.) Web Sites to keep up with.
MSDN Silverlight Development Center
Shawn Wildermuth: He has turn from an ADO guy to a Silverlight guru/trainer.
Scott Gu's Silverlight tagged stories
I have Visual Studio 2003/5/8(+Resharper 4.1) installed on my machine along side siliverlight SDK and Expression Suite.
So far I have not seen any side effects even after installing all those tools on my dev machine after few months.
You can use Silerlight Spy to view the 'reflected' source code of any Silverlight application on the web. But, you can also use it to validate the structure of the components in your running application. The debugging experience reminds me of working with Firebug while trying to decipher the viusal structure of a web page.
In addition to the visual studio stuff, you should probably get blend and all of it's service packs.

Is there a way to productively do Silverlight development without buying VS2008?

It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in the express editions of Visual Studio? Any other tools?
Here is a link for ya: HOWTO: Silverlight and Visual Studio Express,
I haven't tried it myself though.
They just released Eclipse tools for Silverlight (eclipse4SL) and I remembered this thread!
Apparently express support will come with the final release
Depending on what you consider "productive", you could work with XAMLPad for a lot of the basic declarative stuff.
The Moonlight project is working on an IDE called Lunar Eclipse, that I think they're eventually going to be integrating into MonoDevelop. Wikipedia says it's in the SVN repository already, but I don't know if there's any code for that which can actually be run effectively yet. I'd think if it's out there it'd be unusably basic if it even compiles... still, something to look into!
I only use Visual Studio as a text editor for xaml and C#. I don't use the designer in Visual Studio at all. You can put together most of your UI with Blend, open your C# files individually with Express. You don't have much intelisense in Visual Studio for the xaml anyway.
As #Brian stated, you can just use Expression blend and create any WPF/Silverlight apps. Especially if you have some Flash background/more interested in the interaction design (UX) I would recommend you to buy expression blend than VS2008.
You can write C# code in notepad and Blend will take care of the compilation.

Resources