Custom Test Charts

I wanted to create a custom chart in TeamCity (8.1.1) that would basically just display test duration of each test in a testsuite and ideally allow to compare all these results across multiple builds.
I wasn't able to - I followed this:

updated plugin-settings in <TeamCity Data Directory>/config/projects/<ProjectID>/pluginData/plugin-settings.xml to:

<?xml version="1.0" encoding="UTF-8"?>

   <graph title="Duration Comparison" seriesTitle="Dummy" format="duration">
      <valueType key="testDuration" title="testDurationTitle" color="#ee0055"  />   


... and started to output service messages in the form of

##teamcity[buildStatisticValue key='testDuration' value='<duration_in_millis>']"

just before emitting message that marks the end of the test

##teamcity[testFinished name='<test_name>']

When I go to Project->Statistics it shows the chart (with the right title) but it says "No data in builds"
However when I go to a specific build -> Paremeters -> Reported statistic values - it lists test duration under Reported statistic values and in the detail I can see the values for all the builds (however one value for each build and this value is I think the sum of the values reported for all the tests within the build).

So I guess I am missing something...., somewhere..., would you know?

Obviously the question also is whether I cannot get similar chart out of the box....

Thanks in advance everyone

1 comment
Comment actions Permalink

Hello, you need to add buildTypeId to your valueType tag. It must be specified at least for the first valueType within the graph (if you need to use just one conf) or for all configurations you want to be on the graph.


Please sign in to leave a comment.