Automating the “Checklist for Testing SharePoint Web Parts”
The following post was retrieved from my old SharePoint blog: http://vspug.com/kwanl/2006/06/05/automating-the-quot-checklist-for-testing-sharepoint-web-parts-quot/
Recently, I’ve been trying out unit-testing and have seen the benefits. It’s addictive pressing that “Run” button and seeing all your tests pass. Not to mention that seeing your tests fail is a great motivator!
So with automated testing on my mind, a light bulb went off in mhy head when I came across this MSDN article, Checklist for Testing SharePoint Web Parts, on the various situations that every web part should be tested for before deployment into production. I have made a similiar lists before for my own use and I’m sure that many readers have also.
The tests require manual testing on the part of the developer, most of which is pretty boring. After browsing the WSS API, I think that it would be possible to automate many of these deployment tests. Granted, it looks like it will be very difficult (and not worth the effort) to test scenarios such as whether or not your web part renders correctly in FrontPage. But even being to automate a few of the tests will save you lots of time if you’re developing more than a couple of web parts.