Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated Silverlight Unit Testing with CruiseControl.NET

What is currently the best solution to automate running unit tests against silverlight applications within CruiseControl.NET?

Preferably I would like to run MSTest unit tests however as these aren't officially supported for silverlight yet I am open to suggestions that use other testing frameworks.

like image 960
SciFi Avatar asked Jan 19 '10 15:01

SciFi


1 Answers

The November version of the Silverlight Toolkit contains not only the Silverlight Unit Testing Framework, but also an MSBuild task to allow the framework to be run from the command line. See Jeff Wilcox's post for detail, but you essentially end up doing this:

msbuild /t:test /p:browser=firefox

As CC.Net can run MSBuild you should be able to at least call the tests. The output is in TRX format.

I've used this framework with some success, although not integrated into CC.Net, it works fine but the tests run in a browser so are a little slow. The advantage of running in the browser is you can do more acceptance-like tests, running up controls to display. The framework also includes methods to cope with the asynchronous nature of Silverlight.

like image 124
James Bloomer Avatar answered Sep 24 '22 20:09

James Bloomer