Adventures of a wannabe geek!

Ranting within

Automated W3C Validation With TeamCity

This past week, I started experimenting with letting TeamCity create reports of CSS and XHTML Validation from the W3C website. In order to do this validation I was able to use their web URL and pass a URL to the web address. In order to do this I used EasyHTTP as it took care of the web request in a very simple way

When the response is caught, I was able to take the raw text part of the response and save to a html file. This code is very early proof of concept and plans are a foot to be able to pass in validation types and recursive list of files etc.

In order to run this from TeamCity, there was 1 very easy build configuration

image

I had pre-configured TeamCity to add new report tabs when the artifacts were available – using this article. I was then able to tell TeamCity to show these report tabs by outputting the correct files as build artifacts:

image

The reports can be found in the build results screen:

image  

The code will be available very soon but if you feel you want it sooner then please do let me know. There may be changes to the reports but they look similar to the following:

image