Unit testing for SharePoint Development

My teammate, Kirk Evans, has a good blog about SharePoint development. Not just your typical stuff about using SharePoint Designer to create master pages and portals. His blog really covers it from a developers perspective because he’s really a .NET coder first, SharePoint development guru second.

A couple of times we had conversations about how we unit testing is great but if only we had a better story around it for SharePoint developers. With the upcoming Visual Studio 2010 SP1 due out soon, we will have the ability to provide better unit testing support for SharePoint developer using Visual Studio.

The Visual Studio Team Test blog posted a good article back in December about how VS 2010 SP1 will enable basic support for unit testing. Even though SharePoint 2010 is the latest version, its target .NET framework is 3.5, not 4. That’s because when we create our platform, they are typically built on what’s released, not what’s going to be released. With VS 2010, you will have to re-target your test project to .NET 3.5 and 64-bit (since SharePoint 2010 is a 64-bit platform), and you should be good to go. Of course, you really should the article if you want to know whole article (How to re-target unit-tests to .Net Framework 3.5 in VS 2010 SP1).

Excelsior!

Technorati Tags: VS2010,SharePoint