I’ve been investigating a replacement for our current link checker (SEO Optimization Toolkit) to be run automatically as part of our build so that we can get a quick heads up if one of our dynamic pages breaks. The problem is that as most of our sites are built with Ektron there’s a lot of potential for a combination of content and code to break individual pages that share a template with working pages.
As these pages are data driven hard coding tests is very timely and very fragile. Fortunately, most of our Ektron sites have automatically generated sitemap.xml which gives us a neat list of urls to test which is where MbUnit’s StaticTestFactory comes in useful as it allows us to dynamically create distinct tests for each url.
1: using System;
2: using System.Collections.Generic;
3: using System.Globalization;
4: using System.Linq;
5: using System.Net;
6: using System.Xml.Linq;
7: using MbUnit.Framework;
9: namespace MartinOnDotNet.VerificationTests
Attachment: Visual Studio Project