Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View Unicorn Validation on the plugin site for more information.

This plugin uses W3C's Unified Validator, which helps improve the quality of Web pages by performing a variety of checks.

General

The plugin uses gets number of errors/warnings from W3C's Unified Validator. W3C Unicorn Service (http://validator.w3.org/unicorn/) helps to improve the quality of Web pages by performing a variety of checks (HTML validation, CSS validation,...). This plugins takes few arguments (url to check, w3c validator url and threshold for number of errors and warnings to decide the build result) ... look at the Configuration section.

It outputs results to the console and to some properties files which can then be later used with Plot Plugin to output some build history graphs (see the template below for configuration).

Example of results

Example of the W3C Unicorn html output
Example of a Plot

Configuration

Global Configuration

None.

Project Configuration

For a project to use the Unicorn Validation plugin, you need to add it as a build step to your job:


Here you can specify:

Unicorn service URL - the w3c's url is the default one, but you can specify your own if you have custom unicorn service

Site to validate - the url of the site to validate

Max number of errors/warnings for build to be stable/unstable - this is your threshold to decide if the build should be stable/unstable/failed ... currently these number are the same for every aspect of unicorn result (html, css, rss).

Plot Configuration

You can also get a pretty graph which shows you number of warnings/errors of previous builds. There a unicorn template for that to help you configure it.

Plugins required:

Steps to create a new job:

  1. Check out the unicorn-template project from Git: git@github.com:nej/unicorn-template.git
  2. Reload Jenkins' configuration
  3. Click on "New Job".
  4. Enter a "Job name".
  5. Select "Copy existing job" and enter "unicorn-template" into the "Copy from" field.
  6. Click "OK".
  7. Disable the "Disable Build" option.
  8. Setup your build trigger
  9. Fill in your "Site to validate" url
  10. Click "Save".

TODO

- currently these number are the same for every aspect of unicorn result (html, css, rss) ... ability so specify numbers for each result specifically 

- currently all the test are executed that the unicorn validator offers ... ability to choose which ones to execute

Version History

0.1.0 (Feb 13, 2011)

  • Initial public release

7 Comments

  1. Unknown User (s_nemetz)

    I like this plugin. Thank you for writing it. But I'm having a few issues with it.

    1) Does not appears to work on slaves. No files are created.

    2) Sometime doesn't run on master. Maybe an issue with access to w3.org. Might just need some error handling.

    3) Max error/warning values are saved and used, but get reset on read. So when editing or copying a job, just get the defaults instead of the values set in the config file.

    4) Some plot values are wrong. This might be the plot plugin. Most values are ok, but a get about 6000 warning that plot as 450
    Ignore 4. Was a configuration error.

    1. Unknown User (nej)

      Hi Steven!

      I'll look into these issues and get back to you ASAP.

    2. Unknown User (nej)

      1) working on this ... will be release in the next release

      2) if you could capture the error log when this happens it would be great. I tried to reproduce it, but without success.

      3) Fixed ... release 0.1.1 should be in the Update center in few hours.

      4) Ok

  2. Unknown User (nikos)

    Thanks for providing this useful plug-in, it is very helpful for our project.

    Just a small hint:

    • For users behind a proxy please be aware that the Unicorn plug-in does not make use of the Proxy settings in your Jenkins configuration, but you need to set them as JVM properties (-Dhttp.proxyHost=yourproxy -Dhttp.proxyPort=3128) to make the internally used Jsoup to use the proxy. Under Linux you can put those inside /etc/sysconfig/jenkins and use the environment variable JENKINS_JAVA_OPTIONS
  3. Unknown User (gregginspire)

    Thank you for creating this tool.  Currently, I can only get CSS Level 2.1 validation, how do you get it to perform Level 3 validation?

  4. Unknown User (cfessel)

    Hi,

    thanks for the nice plugin.

    I want to validate different templates on a website. Each template has an unique url. Is it possible to validate more than one url? And is it possible to group the results?

    Best regards,

    Christian

  5. Unknown User (cfessel)

    Hi,

    thanks for the nice plugin.

    I want to validate different templates on a website. Each template has an unique url. Is it possible to validate more than one url? And is it possible to group the results?

    Best regards,

    Christian