Andrew Connell [MVP SharePoint]
1579 Posts |  42 Articles |  4864 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

[via Spence Harbar]

For those not familiar with the terms: SDL = Software Development Lifecycle & TDD = Test Driven Development.

A few weeks ago Spence mused on the subject of TDD for SharePoint. I like the points he makes: (1) you don't see many SharePoint developers incorporating TDD into their projects and (2) there are some inherit challenges incorporating pure TDD into SharePoint development experiences. Make sure you check out his post on TDD in SharePoint... it's a great read.

Why don't we see people incorporating TDD more into their SharePoint projects? One reason is the lack of community leadership. Look at the general .NET community crowd; there are a ton of folk out there who blog their experiences and favorite code snippet of the day... then there's that small community of TDD .NET bloggers who have plenty of articles & blog posts on how to incorporate automated unit testing practices, continuous integration, and mocks into their own company's SDL.

However you don't see the same leadership in the SharePoint space. There are smatterings of it here and there... like Spence's post, and Bil's post on creating Web Parts using the MVP pattern last year (Bil's probably the one SharePoint blogger that blogs most prevalently on TDD)... course there are a few others but these are the two that stand out to me. What we need to really have some true TDD adoption in the SharePoint development space is some leadership by people who REALLY know what they are talking about. Things like "how to incorporate [automated unit testing | continuous integration | mocking] into your SharePoint environment."

I know... I know... "but it's just .NET development, why do we need SharePoint specific leadership?" Because it seems we always do. Look at my article on setting up dual authentication for a WSS site... 90+ commends and most deal with configuration issues specific to the providers... but it's just ASP.NET 2.0... not much SharePoint! So what... people still think SharePoint is a special animal. Is it? Not really... no more than any other application... but some real SharePoint specific articles would go a long way (hear me MSDN Mag)?

So why don't I get up off my rear and write them? Two reasons: I'm no expert and frankly, I struggle with it a bit. I use MbUnit religiously in all my SharePoint projects, but I'm by no means an expert on continuous integration or mocking.

Let's hope some of the leaders in this space have a few free moments to write some killer HOWTO articles.

posted on Monday, April 09, 2007 2:26 PM

Feedback

# re: Real SDL & TDD for SharePoint 4/10/2007 3:16 AM Anders Rask
Gravatar Who is Ted ;-)

# re: Real SDL & TDD for SharePoint 4/11/2007 11:40 AM Chris Chapman
Gravatar Hear, hear!

As one of the "smattering" of minor leaders in the space of trying to get TDD into SharePoint, I agree wholeheartedly with the points you've raised.

Over a year ago I got fed up with the lack of direction in SharePoint TDD and decided to write my own NUnit base class to ease the pain - which I blogged about in two articles (http://www.chapmanconsulting.ca/Lists/Posts/ViewPost.aspx?ID=36 and http://www.chapmanconsulting.ca/Lists/Posts/ViewPost.aspx?ID=38). These articles were picked up by Mike Gunderloy on his daily blog and it touched a nerve - these posts have hits in the tens of thousands; it's obvious that there are a LOT of other SharePoint developers who want to step up their game and create solid, tested code.

From what I've seen so far, there are a number of impediments to getting TDD totally working for SharePoint:

1) SharePoint itself - it's a complex app, and it is difficult at times to stratify code dependencies so that you're driving value out of the tests.

2) Developer uptake - a lot of experienced developers still sneer at the idea of TDD in a sterile "test this assembly" model, never mind testing a complex web app.

3) Industry ignorance - a big one for me: Convincing project sponsors that TDD isn't a waste of time. This can be doubly difficult for SPS investments as TDD in this space can take a little longer to get it right.

4) Proper tools and dev environment - TDD works best if your developers all have access to their own image to work and test against, and that there is a master image where the CI takes place.

I think it's all possible, but I'm not entirely sure the leadership will come top-down from an authority; it's more likely to manifest as the collected experiences and wisdom of developers and consultants from around the web.

Chris Chapman

# re: Real SDL & TDD for SharePoint 4/15/2007 5:57 PM Eric Landes
Gravatar I've added a few experiences of my own with TDD on my blog. feel free to check the first one out at http://aspadvice.com/blogs/elandes/archive/2007/04/15/TDD-development-with-Sharepoint-2007.aspx

# re: Real SDL & TDD for SharePoint 4/15/2007 10:14 PM AC [MVP MOSS]
Gravatar Eric-
The name is Connell, not McConnell.

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 6 and 4 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2010 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 5-day hands-on and online WCM classes for developers I offer through my company: Critical Path Training.

Get more information on the WCM courses!