Markup validation with Jenkins

Preparation

Search and install the “Unicorn Validation Plugin” and “Plot Plugin”

jenkins unicorn plugin
Search for Plugin

Configure

Within the build section, add a build step “Unicorn Validator”. For the Site to validate add a URL to a site that you want to test. Before you configure the Post-build Actions you should save and run. After 1st run the workspace should look similar.

unicorn results
Workspace files

Now start configuration again. On Post-build Actions section add “Plot build data”, and add the following details:

unicorn configuration
Plot configuration

Now you can run the build again and on job navigation you see the item “Plots”. Repeat the last step for plotting of css results. As value for “Plot title” use “CSS Validation errors” and for “Data series file” use “css3-validator_errors.properties”.

RATS

RATS – Rough Auditing Tool for Security. Open-Source software to scan C, C++, Perl, PHP and Python code. For other languages see Fortify.

Installation

# CentOS
$ yum install rats

# Debian
$ aptitude install rats

# wget
$ wget http://www.fortify.com/servlet/download/public/rats-2.3.tar.gz 

# curl
$ curl --remote-name http://www.fortify.com/servlet/download/public/rats-2.3.tar.gz

# extract
$ tar xfz rats-2.3.tar.gz

# change directory
$ cd rats-2.3

# compile
$ ./configure && make && sudo make install

Execute RATS

# Simple run
$ rats --resultsonly <directory>

# Advanced run
$ rats --quiet --xml -w 3 <directory>