Azure-pipelines-tasks: Feature Request - Add support for uploading third-party unit test and code coverage results to VSO.

Created on 19 Oct 2015  Â·  13Comments  Â·  Source: microsoft/azure-pipelines-tasks

For those of us creating cross-platform applications, we rely on many different unit test and code coverage results, like OpenCover (CLR), and Mocha (JS). I'm not expecting VSO agents to automatically consume all of the variant formats that are out there, but it would be great if there was an API endpoint and a VSO task that could publish results in a pre-defined format and allow third party tools to emit that format, or create transforms to support it.

Most helpful comment

i generated the html reports using reportgenerator https://github.com/danielpalme/ReportGenerator

Still no luck :(

image

All 13 comments

There already is. The Publish Test Results task will publish from a variety of formats like Nunit, Junit, xUnit and Trx.

From: Deavon M. McCaffery [mailto:[email protected]]
Sent: Monday, October 19, 2015 1:54 PM
To: Microsoft/vso-agent-tasks [email protected]
Subject: [vso-agent-tasks] Feature Request - Add support for uploading third-party unit test and code coverage results to VSO. (#657)

For those of us creating cross-platform applications, we rely on many different unit test and code coverage results, like OpenCover (CLR), and Mocha (JS). I'm not expecting VSO agents to automatically consume all of the variant formats that are out there, but it would be great if there was an API endpoint and a VSO task that could publish results in a pre-defined format and allow third party tools to emit that format, or create transforms to support it.

—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fMicrosoft%2fvso-agent-tasks%2fissues%2f657&data=01%7c01%7cChris.Patterson%40microsoft.com%7c04233e0031ad44d8414e08d2d8ae34e7%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=fGvXH3QjxxGpsmepHM9n7262FBnwh1Vx427GWMFAkkk%3d.

Agreed for unit test results; this was more geared toward code coverage results. My apologies for the confusion -- not sleeping much these days trying to keep up with DNX. :)

Hello Deavon,
We are currently working on adding code coverage support for DNX apps. We are also adding a Publish Code Coverage task with Jacoco and Cobertura formats - we have extensibility for other formats as a backlog, we are still looking at the right way of exposing it as a REST API.

@gopinathch This is awesome news! I thought it would be further off in the distance than this, so I'm happy to hear this. It's obviously not a blocking issue. It would just be nice to be able to collect and see everything in one place, instead of having to look at a build in AppVeyor, a build in Travis, and a report in Coveralls, as an example. VSO / TFS is staged to be the perfect blend of everything one needs.

@atinb ?

The Publish Code Coverage task has been shipped and can be used to upload Jacoco and Cobertura formats.

snip_20160708232151
image
I gave the cobertura.xml in the publish code coverage task.I am getting the attached error message.

Please help me if any one came across this type of issue

Atin, can you look into this?

Sent from my Windows Phone


From: nanivijaymailto:[email protected]
Sent: ‎7/‎8/‎2016 11:23 PM
To: Microsoft/vsts-tasksmailto:[email protected]
Cc: gopinathchmailto:[email protected]; Mentionmailto:[email protected]
Subject: Re: [Microsoft/vsts-tasks] Feature Request - Add support for uploading third-party unit test and code coverage results to VSO. (#657)

snip_20160708232151
image
I gave the cobertura.xml in the publish code coverage task.I am getting the attached error message.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/Microsoft/vsts-tasks/issues/657#issuecomment-231518456

@nanivijay
Are you specifying the files in the Report Directory field? Can you attach a screenshot of the settings in your Publish task? Thanks!

image

Which files/directory i need to give in the report directory path. I have only the opencover.xml after running the open cover and then converted it into coberura.xml using https://github.com/danielpalme/OpenCoverToCoberturaConverter

Other than the Summary file, there is an reports directory created with HTML files. You have to point to that directory in the Report Directory field. Thanks!

i generated the html reports using reportgenerator https://github.com/danielpalme/ReportGenerator

Still no luck :(

image

I am using opencover to generate the codecoverage xml(https://github.com/OpenCover/opencover) for asp.net 5 DNX application. After that i am using Reportgenerator to generate the htmls.(https://github.com/danielpalme/ReportGenerator) .VSTS supports Cobertura in the publish task so i converted the opencover coverage xml to Cobertura using https://github.com/danielpalme/OpenCoverToCoberturaConverter.

Please let me know if you need more information.

Was this page helpful?
0 / 5 - 0 ratings