With the Windows Phone Marketplace, user feedback and ratings are supremely important. One annoying bug can mean the difference between a 5-star rated, top-selling app, and a mediocre seller. Test Driven Development gives us a developers an assurance that our apps are internally consistent and perform properly, especially as we add new features and releases to existing applications.
I’ve been hunting around for a good way to use TDD in the Windows Phone 7 world. They core issue is that if we are testing things like phone APIs and IsolatedStorage, the tests themselves obviously have to run on the emulator. Thankfully, Jeff Wilcox has extended the Silverlight unit testing framework with a Windows Phone 7 version. It even has a basic UI so you can see your test results on the emulator.
If you have any interest in learning how to use this test framework in a robust TDD approach for Windows Phone development (and you should), David Gadd’s Windows Phone TDD Kata is an awesome starting point. The kata also covers MVVM and touches on Domain Driven Development. All of these things rolled together will ensure that you can output high-quality, bug-free applications that delight users and end up with great ratings.