Are there any problems that I should know about using unit test code on a Windows 7 phone?

I assume that since the code is standard C #, I can just use nUnit, TestDriven.net, etc.

Did I miss something?

What traps are there other people trying to do this?

0
unit-testing windows-phone-7
source share
3 answers

If you're talking about testing C # code in a Silverlight-based project, then you need to take some steps to use frameworks like nUnit. C # code in a Silverlight project will be compiled with Silverlight binaries, so binaries for nUnit will not work as they are, since they are compiled against the standard .NET platform.

If you want to use nUnit, you can set up a regular C # class library and reference your Silverlight C # files in this project. You want to add them as a link, which is described in detail here . From personal experience, this can get a little crazy because your file is linked in two places and the ability to link files is limited (if your Silverlight C # code refers to any binary files associated with Silverlight, you cannot perform this link trick).

Another option is to use the Silverlight Unit Test Framework, binaries for which can be found here . This is very similar to the Silverlight tester in the Silverlight Toolkit, except that it runs on the phone as a phone application.

+1
source share

Have you looked at the Silverlight Unit Testing Framework , which is now part of the Silverlight Toolkit ?

It has not been ported as part of the WP7 toolkit, but some people have reported some success in using it.

+1
source share

I would suggest WP7-CI . I had success, and this is the only thing I have been able to find so far that works with asynchronous unit tests, if you need them.

See also my question:

Is there an alternative to the wp7 mango unit test runner for NUnit that supports the [Asynchronous] meta tag?

+1
source share

All Articles