A while back I posted about automating the checking of HTML validity of your ASP.NET site using unit tests that leverage the W3C Markup Validation Service. I’ve showed the technique in a number of presentations since then and used it on a number of projects to good effect.
In an effort to make it easier to consume in your own project and allow for future expansion with new features, I’ve refactored it and rolled it into a new open-source library called WebAssert, up on CodePlex.
This initial release supports checking for markup and CSS validity of URLs using the W3C hosted validators, or your own hosted instances. This release supports the MSTest framework in Visual Studio but there is already a fork containing a wrapper for NUnit which I plan to integrate soon. You can also test sites hosted using the AspNetDevelopmentServer attribute under MSTest.
Any feedback please let me know.
I’ve uploaded a new release that now includes item templates for C# & VB Web Application Projects and Web Site Projects. Plus, there is now a Project Template for creating C# Web Application Projects pre-configured to be XHTML 1.1 compliant, use a master page & theme, and the CSS Friendly Control Adapters. It has some other goodies in it too (e.g. support for print specific CSS files in themes).
Feedback always appreciated.
I’ve released a new CodePlex project: Visual Studio 2008 XHTML 1.1 Templates
As the name suggests it is a set of item templates for Visual Studio 2008 web projects based on XHTML 1.1. The initial version includes item templates for the following item types:
- Web Form
- Master Page
- AJAX Web Form
- AJAX Master Page
- HTML Page
At this stage only templates for C# Web Application Projects are included but I will add similar templates for VB and Web Site Projects shortly.
There is a simple installer included to make it extra easy.