blogger counters

Thursday, December 29, 2005

NUnit and Compact Framework Applications

I recently learned about Test Driven Development and got really excited. Until, that is, I discovered that my version of Visual Studio doesn't have the great new tools for team development. For that you need one of the Team editions, but at more than $5,000, I wasn't quire ready to take the plunge.

So I decided to try NUnit, which is an open source application for testing .NET applications.And it works, within some well-defined cases.

There are limits to what you can and cannot test using NUnit to test your Windows Mobile applications. Since NUnit is running on the desktop, your unit tests also run on the desktop rather than a Windows Mobile platform (device or emulator). If your testing code that isn't dependent on the Windows Mobile platform, you should be able to write and run unit tests on the desktop because your CF applications classes will load and run on the desktop as long as they don't require PocketPC/Smartphone-specific code (such as PInvoke calls to coredll).

Of course, it would be far better to test your code on the target platform, or at least for some test cases. Right now there is only one test harness I'm aware of that runs on Windows Mobile itself: CFNUnitBridge. I haven't tried this yet, but I'm just getting started with test-driven development.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home