This guide will show you how to integrate Kiuwan inspections in your software development cycle using Team Foundation Server.
Contents:
Team Foundation Server Architecture.
TFS has a distributed architecture. The Kiuwan Local Analyzer must be installed on each machine where you have a TFS Build Agent.
Once Kiuwan Local Analyzer is installed, you should try to login with it to check that there are no connectivity issues.
Your credentials will be saved in a cipher form for subsequent analysis when they are run from the command line interface as well.
Assuming kiuwan has been installed in c:\, we need to create a small script that will be invoked from the TFS build agent.
@echo off
:: tfs2kiuwan.cmd
:: script to launch kiuwan analysis from team foundation server build.
:: -------------------------------------------------------------------
setlocal
set KIUWAN_HOME=C:\KiuwanLocalAnalyzer
set KIUWAN=%KIUWAN_HOME%\bin\agent.cmd
%KIUWAN% -c -n "%TF_BUILD_BUILDDEFINITIONNAME%" -l "%TF_BUILD_BUILDNUMBER%" -s "%TF_BUILD_SOURCESDIRECTORY%"
endlocal
Sample Application
The following steps assume that you are using Visual Studio 2013 and Team Foundation Server 2013. Both with ‘on-premise’ installations.
From Visual Studio, Help – Samples, you can download the sample application to use.
Add the application to Source Control
In Solution Explorer, right-click on the SimpleCalculator solution. Then go to Add Solution to Source Control.
A new dialog appears: Choose Source Control backend. Select Team Foundation Version Control.
Finally, select a TeamProject where to place this project and create the solution folder.
Build definition
Once you have created the solution in TFS, now you can define a new build process for the solution.
Open the Team Explorer tab.
Double click on Builds and select New build definition.
Here you have screencaptures of the dialog boxes to configure the build definition:
Commit the changes and get the analysis results in Kiuwan
Finally, commit the changes to the repository, and a new build will be automatically triggered.
Login to kiuwan.com, and you can see the results for your application analysis.
For each commit in the repository, a new build and analysis will be run automatically:
Compare each commit against the previous
Each analysis will generate a new version in Kiuwan. You can see all the builds in the Analysis drop-down list:
Click Compare to see a defect comparison between both analyses.
Now you have a continuous analysis of all your builds in Kiuwan.
With all your builds analyzed in Kiuwan, you can have a continuous improvement process as well. For example, by creating automatic action plans to solve critical issues found by Kiuwan for your next release and track their progress of execution.