KPI – Percentage Code Coverage


Hope everyone is doing well, I finally had a chance to post my first KPI-of-the-week.

This KPI reports on the amount of code coverage that we get from our test runs for our entire source base.  What is particularly useful about KPIs in general is their ability to report on time; that is, how your KPI looks this week versus last week and the previous week.

What we will end up with is something that looks like:


This KPI uses a reversed gauge indicator to show how our code coverage matches our goal.  In this particular case, our code coverage isn’t very good

YouTube has a pretty strict 10 minute limit on their videos, so I broke this session up into a few videos.

First, we’ll go through setting up the Analysis Services project, data sources, views and the basic cube.  If you’re already familiar with this, you may want to skip this video.

The rest of the videos illustrate setting up various aspects of the KPI.

I know the videos I’m posting still don’t have very good resolution, so I posted some screen shots of text that is important to building the KPI in case anyone wanted to try building the same KPI.

First, the calculated members that we create; the PercentCodeCoverage calculated member should look as follows:


The PercentCodeCoverageGoal should look like:


An for the KPI itself, the value and goal expressions should look like:


And the status expression should look like:


And finally, the trend expression should look like:


Hope you enjoy the video, comments and feedback are welcome as usual.


Comments (3)

  1. Rob Caron says:

    David Lemphers blogged about a brainstorm he had recently to use Team Foundation Server to create…

  2. Dylan Smith on Database Unit Testing – Not quite there yet…

    David L. on Team Foundation Server…it’s…