REST API - CodeCoverage not showing in stadistics "/httpAuth/app/rest/builds/id:BUILDIDHERE/statistics"

Hi

I am using the REST API 9.x to get some data and it has been a great experience so far. I usually get CodeCoverage data from the following address "/httpAuth/app/rest/builds/id:BUILDIDHERE/statistics" getting a result like that

<properties count="30">
<property name="ArtifactsSize" value="16671813"/>
<property name="BuildArtifactsPublishingTime" value="1732"/>
<property name="BuildCheckoutTime" value="655"/>
<property name="BuildDuration" value="329551"/>
<property name="BuildDurationNetTime" value="327164"/>
<property name="buildStageDuration:artifactsPublishing" value="1888"/>
<property name="buildStageDuration:buildFinishing" value="57844"/>
<property name="buildStageDuration:buildStepRUNNER_238" value="26424"/>
<property name="buildStageDuration:buildStepRUNNER_258" value="232265"/>
<property name="buildStageDuration:buildStepRUNNER_284" value="9772"/>
<property name="buildStageDuration:firstStepPreparation" value="328"/>
<property name="buildStageDuration:sourcesUpdate" value="811"/>
<property name="BuildTestStatus" value="1"/>
<property name="CodeCoverageAbsCCovered" value="33"/>
<property name="CodeCoverageAbsCTotal" value="34"/>
<property name="CodeCoverageAbsMCovered" value="80"/>
<property name="CodeCoverageAbsMTotal" value="97"/>
<property name="CodeCoverageAbsSCovered" value="344"/>
<property name="CodeCoverageAbsSTotal" value="410"/>
<property name="CodeCoverageC" value="97.0588226318359375"/>
<property name="CodeCoverageM" value="82.4742279052734375"/>
<property name="CodeCoverageS" value="83.902435302734375"/>
<property name="IgnoredTestCount" value="2"/>
<property name="InspectionStatsE" value="0.000000"/>
<property name="InspectionStatsW" value="0.000000"/>
<property name="PassedTestCount" value="46"/>
<property name="SuccessRate" value="1"/>
<property name="TimeSpentInQueue" value="47"/>
<property name="TotalTestCount" value="48"/>
<property name="VisibleArtifactsSize" value="9411990"/>

</properties>

However for my latest build I got a response which does not contains CodeCoverage variables.

<properties count="19">
<property name="ArtifactsSize" value="14434517"/>
<property name="BuildArtifactsPublishingTime" value="47"/>
<property name="BuildCheckoutTime" value="3466"/>
<property name="BuildDuration" value="287960"/>
<property name="BuildDurationNetTime" value="284447"/>
<property name="buildStageDuration:artifactsPublishing" value="90"/>
<property name="buildStageDuration:buildFinishing" value="362"/>
<property name="buildStageDuration:buildStepRUNNER_238" value="32504"/>
<property name="buildStageDuration:buildStepRUNNER_258" value="238848"/>
<property name="buildStageDuration:buildStepRUNNER_284" value="11997"/>
<property name="buildStageDuration:firstStepPreparation" value="361"/>
<property name="buildStageDuration:sourcesUpdate" value="3561"/>
<property name="BuildTestStatus" value="1"/>
<property name="IgnoredTestCount" value="2"/>
<property name="PassedTestCount" value="46"/>
<property name="SuccessRate" value="1"/>
<property name="TimeSpentInQueue" value="35784"/>
<property name="TotalTestCount" value="48"/>
<property name="VisibleArtifactsSize" value="13987982"/>

</properties>


My questions are the following:
  • Is it because of the new version of the API?
  • Can I get those values from somewhere else?
  • Is there any reason why CodeCoverage sometimes does not show? (if the values are the same has previous build or something like this)


As an additional information I can see CodeCoverage values if I browse to teamCIty page stadistics tab for my build.

Thanks for your time.

Alberto
8 comments
Comment actions Permalink

Hi Alberto,

Code coverage statistics values should be returned by the REST API request. What type of code coverage do you use? Do you see these code coverage values if you send REST API request for the old builds (run in previous TC version)?
Could you please describe the third question in more details, possible with screenshots?

0
Comment actions Permalink

Hi Alina,

Thanks for your quick response.We are using DotCover as Code coverage tool.

Definetly after upgrading to 9.0 version we are not generating any code coverage data. If I go to any build before the update I can see the code coverage information (see screenshot A)  whereas If I try with a any build after the upgrade I cannot see it (see screenshot B).

Screenshot A
http://i.imgur.com/m3M3K2y.png

Screenshot B
http://i.imgur.com/R9cnUZf.png

This is the configuration I have for the build where I can see that the code coverage is activated (we have not change any configuration)
http://i.imgur.com/ziad5se.png

Am I doing anything wrong? Is there anything else I have to change after an update to make code coverage work as it was before?

Thanks,

Alberto

0
Comment actions Permalink

There is no Code Coverage tab for new build at all. Could you please attach full build log for build after upgrade (which has no statistics data)?

No, you should not make any changes to make DotCover work. FYI: all needed changes are described in Upgrade notes.

0
Comment actions Permalink

Attached you can find the Build log file :)

Thanks



Attachment(s):
Communication_Service_1._Build_Package_1.0.336.log.zip
0
Comment actions Permalink

Hi Alina,

Is there anything we could do to investigate it in our side?

Thanks,

Alberto

0
Comment actions Permalink

Hi Alberto,

Sorry for delay. Please collect additional dotCover logs and attach dotCoverLogs.zip. file.

0
Comment actions Permalink

Hi Alina,

Attached you can find the additional dotcover logs.

Regards,

Alberto



Attachment(s):
ThePlatform-CodeCoverage-Logs.zip
0
Comment actions Permalink

Hi Alberto,

Thank you for provided logs. According to logs dotCover was not able to generate the report, but unfortunatelly the reason is not clear. I've created the issue - https://youtrack.jetbrains.com/issue/TW-39389, please watch and vote for it.
We need to reproduce this bug. Could you please post agent environment where you run this build as a comment to the issue?

0

Please sign in to leave a comment.