Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What unit testing options are available for Silverlight?

Of course there's the Silverlight Unit Test Framework (which seems more like integration testing to me), this port of the NUnit.Framework assembly, and SilverUnit, but what other options are available for Silverlight unit testing?

Any good/bad experiences with any one of those (or others)?

like image 573
Scott Marlowe Avatar asked Aug 01 '09 21:08

Scott Marlowe


2 Answers

The Silverlight Unit Testing Framework is an adaptation of the same metadata from Visual Studio's test framework. I developed it in my spare time a few years ago while working on the Silverlight team, and today we're shipping it a little more formally.

I recommend it simply because it is being used by so many teams inside and outside of Microsoft, and if you've used the existing test metadata, it all just works - no new learning.

Find it here:

  • It ships in the source code package for the Silverlight Toolkit, since the Silverlight Toolkit controls use this test framework. Find it in the "Binaries" folder.
  • Download the binaries at the MSDN code gallery page
  • The open-source (Ms-PL) code to the framework itself is available for download in the Silverlight Toolkit's source code enlistment.
  • More information, tutorials, and documents are available on my blog (sorry to link to myself here, but I am the Microsoft developer of the framework)

The framework does have limitations, unfortunately

Because of the security model for Silverlight Applications, the framework has less integration that the typical VS test suite: tests run inside the browser, are technically built Silverlight apps, and automation and code coverage are a bit of a challenge to get going.

But it's a first step in doing Silverlight development.

In the future, the test framework is actually going to become a proper part of the Silverlight Toolkit - additional tools including an automated test runner, build server integration, and even simple block-level code coverage will be released.

like image 93
Jeff Wilcox Avatar answered Sep 20 '22 12:09

Jeff Wilcox


You can use the Silverlight Unit Testing Framework to do your testing. THere is an example here

There is also WebAii from Art Of Test. I haven't used this framework in anger but have managed to use it test the front end parts of a Silverlight Application.

like image 25
AutomatedTester Avatar answered Sep 19 '22 12:09

AutomatedTester