How to get build statistics?

I need to extract statistics such as how many builds were done last week for each build configuration in a given project how many of them successful (per build configuration). Also average run times, average coverage of tests, number of failed test runs out of total for the past x days and so on. I have seen the graphs under “Statistic” tab, but what I need is numbers, and also per project and not build configuration.

Is there a TeamCity feature or a plugin which allows to generate a report like this?

9 comments
Comment actions Permalink

Yes, there's a way to add custom statistics charts to Teamcity on build configuration and project level. See http://confluence.jetbrains.com/display/TCD8/Custom+Statistics and http://confluence.jetbrains.com/display/TCD8/Custom+Chart.

0
Comment actions Permalink

Hello Sergey and thanks for the response.
I understand that I'll need to write a plugin for that, is that correct?
Is there another way? Can I, for example, publish an artifact with the desired inforamtion and then read from it with my own mertic gathering tool?

0
Comment actions Permalink

You don't need to write a plugin, but rather configure how you'd like data to be presented.

0
Comment actions Permalink

Then I probably misunderstand your documentation, it's too vague and concise. The page you linked about Custom Statistics talks about implementing and extending, where does all this coding taking place?

0
Comment actions Permalink

Custom chart is about creating a statistics page on a project or server level. However, its capabilities are limited and designed for graphics, rather than numbers (you can see numbers, but not in a very convinient way). Statistics is based on build configuration and builds basis. It grabs information for every build.
For instance, if you use BuildDuration parameter, you'll see a Build Duration per build. If you then select "Average" checkbox and increase range to Year, you'll see averaged value for week as a one dot.
2) You can see # of builds per week if you select a range=week and count them

If you need another, more convinient view, then you'll need write to a plugin using custom statistics and put values on page as described in documentation.

Alternatively, you can grab all this information using REST API and aggregate in the way you'd like.
---------

Summarizing this, there's no easy way to get such information from TC.

0
Comment actions Permalink

Sergey,
Thanks for the thorough reply. It looks like the REST API will suit my needs best.

0
Comment actions Permalink

@Maria M did  you ever get to writing the plugin? if  yes than is it shareware?

 

@Sergey,

is it possible to to create a statistical report of all build failures at the root level ( no at the project level), I would like to show my mgmt how we are doing and where improvements can be made so such report will be helpful. 

 

Any suggestion of a pointer into an existing plugin that will do the trick is appreciated.

0
Comment actions Permalink

Hi Shiamak,

 

while new features have been introduced, most of the same Sergey wrote still applies. You can prepare custom charts from the statistics we collect. If you need something fancier or more specific, you will need to create your own gathering the data from the REST API. You could also consider reading directly from the database for that purpose.

0
Comment actions Permalink

Hi Denise,

I am looking for Build statistics ( How many builds failed and why etc and how many were successful) so Iw as wondering if there was a scripts available somewhere (using TC REST API ) of the same. I have an urgent and need and I do not have time. I am willing to pay for a commercial tool if it is available.

0

Please sign in to leave a comment.