in Continuous Delivery

Code Metrics Trend in Jenkins with VS Code Metrics Powertool VS2013

Prerequisites

Visual Studio Code Metrics Powertool for Visual Studio 2013: http://www.microsoft.com/en-us/download/confirmation.aspx?id=41647

Jenkins plugin Visual Studio Code Metrics Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Visual+Studio+Code+Metrics+Plugin

First you need to download and install Visual Studio Metrics Power tool which will install metrics.exe in the following location: c:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\metrics.exe.

In Jenkins instance install Visual Studio Code Metrics plugin which will enable you new options that have to be configured.

Navigate to Manage Jenkins >  Configure System > VS Code Metrics PowerTool

image

Go to build job.

Add a new build step and configure it as follows:
image

Add a new post-build step and configure it as follows:
image

Results

After you run the build job, you will start to get results.

On the job results page
image

By accessing Code Metrics option from left side you can go deep into details
image