Jens' Codelog All things geek

HTML, CSS and RSS validity unit-test (java)

Published on 16/04/09
by jens

When developing standards compliant web sites, it is important to regularly check your mark-up for validity to ensure you are adhering to the choosen doctype. While the W3C provides an excellent online validator for checking documents, it can be cumbersome to regularly perform manual tests with internal, dynamically generated web sites.

Fortunately these tests can easily be automated and thus performed regularly as unit or integration tests using this tiny package of validators. Validators as in plural because in addition to validate *HTML, they also check for CSS and RSS validity.

Before i sat down to write my own set of automated integration tests for just this i thought to myself; ‘someone else must have had this exact problem and solved it’. I put my googles on and found that indeed someone had for dot net.. I needed the same test for a java based project and thus wrote it.

Git my package from http://github.com/jtinfors/w3c-validation-unit-tests/

I love my validator

That's it. What Next?

Please leave your comment so we know what you think about this article. Trackback URL: HTML, CSS and RSS validity unit-test (java).