Unit test in Silverlight

SilverLight NUnit project and NUnit SilverLight project are two different projects.

The first one can only be used inside IDE, launched by testRunner.

NUnit Silverlight is intend to replace the default MSTest with NUint syntax in default Silverlight unit-test project ship with Silverlight tool-kit. By default, SilverLight UNnit Test project from Toolkit comes with MSTest, it can be replaced by NUnit, by referencing NUnit SilverLight project.

To make it continuous-build friendly, I  had to create a local lib folder right under silverlight unit-test project then create those linked reference, otherwise build server kept complaining missing reference error.

RhinoMock has a SilverLight edtion in case you need to mock something.

This walk through explained how to use MsBuild to implement a command line runner, note, must navigate to test project path to launch MSbuild command, not the web one.

Unfortunately, I got the same broswer-not-closing problem. I haven’t got time to try this workaround yet.

A bettor solution is to use StatLight. Need to find out the xsl file for CC.net. A simple xsl file to cc.net can be found at here.

SilverUnit is only used by TypeMock, a commercial product.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s