I'd like to use MSBUILD to check the validity of both the rendered HTML and CSS of all pages in a site, and break the build on errors.
Can anyone recommend a strategy to validate HTML and CSS in an automated build? Are there any tasks out there to do this now?
I can't tell you how to do this in MSBuild, but I can tell you how I would approach this task.
*Step # 5 will be somewhat tricky because you'll likely have to maintain a list of URL's to test, since you cant just open up the .aspx files, and if you're running MVC, the urls will be almost impossible to automatically generate based on the files themselves due to routing etc.
Seems like someone could easily make a CSS (maybe one for staic html too) validator plugin for Hudson or CC.net quite easily, you could even display the results quite nicely in a trend graph, etc.
I haven't played around with using MSBuild to do this stuff too much because I use Hudson. However, I think you should be able to do all of this quite easily as post build commands since its all just command line stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With