Closed joshmouch closed 4 years ago
Hey @joshmouch,
I don't think the Publish Code Coverage task is the correct task for your situation. It's expecting a summary XML
file (not a .coverage
), which is why you're seeing the code coverage as empty
The Visual Studio Test task already publishes the information you want and should be viewable as one of the tabs on your pipeline result page. See here for more info on that task: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/vstest?view=azure-devops
If that's true then the code coverage screen is pretty limited, correct? This is what Resharper tells me is covered:
And this is all I see on the DevOps screen. First, the 50% is wrong...
... then when I click on the "Code Coverage succeeded" header, it takes me to the "Code Coverage" tab, which only has a download link and no useful reports.
I think I've come to the conclusion that the push here is to use a third party tool for the code coverage results. I've also run across a nuget package called Coverlet which is supposed to convert ".coverage" binary files to xml, so I'll give that a go.
@cltshivash may be able to answer your questions.
I don't think converting to an XML file is enough to allow you to use the PublishCodeCoverage
task
Is there any more news on this? Seems we have the same issue.
Can someone please clarify if the Code Coverage tab is supposed contain only a link to download the results? Or is it supposed to display the results, but it is broken due to a bug in the task?
Not asking you to immediately fix a bug (should there be one), just some information would be much appreciated.
Edit: according to https://github.com/microsoft/azure-pipelines-tasks/issues/11677 the Visual Studio Test task is responsible for the Code Coverage tab being mostly empty.
@stijnherreman Currently , code coverage task is supposed to contain only link to download results .
For a first class view , we are soon going to roll out this the following:
If you are interested in this , we will enable this on your account in couple of days. You can try this and give us further feedback before this feature becomes GA.
@anshii03 that's great news! I don't have any pipelines on my personal account, could it be enabled on an organization? If so, can I contact you via email?
@stijnherreman this can be enabled on organization also. You can mail on devops_tools@microsoft.com.
@stijnherreman Currently , code coverage task is supposed to contain only link to download results .
For a first class view , we are soon going to roll out this the following:
If you are interested in this , we will enable this on your account in couple of days. You can try this and give us further feedback before this feature becomes GA.
@anshii03 I have started using this in my pipeline on Azure Devops Server and very much interested in seeing the results as well. Is there a timeline when will this be rolled out ? or can I get it enabled in my pipeline as a pre release ?
@hyousuf - Please mail your account details on devops_tools@microsoft.com. We will enable it on your account as well before release and will love to get your feedback.
We are closing this ticket now as soon we will be releasing this new view to show the code coverage results.
If anyone is interested in this view , please mail your account details to devops_tools@microsoft.com We will enable this view on your account.
Hi anshi03
My account in azure devops is carsnow21.visualstudio.com
And this is one of my pipelines where i would like to enable code coverage summary
https://carsnow21.visualstudio.com/CarsNow/_build?definitionId=3&_a=summary
On Tue, 21 Jan 2020, 05:55 anshii03, notifications@github.com wrote:
@hyousuf https://github.com/hyousuf - Please share your account details. We will enable it on your account as well before release and will love to get your feedback.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/azure-pipelines-tasks/issues/9954?email_source=notifications&email_token=ABR6FQFR7SXVPLCLQ3N3VD3Q62E65A5CNFSM4HBY27I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJOSMSA#issuecomment-576529992, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABR6FQGVPLISXEGBI7PVT6LQ62E65ANCNFSM4HBY27IQ .
@hyousuf Please mail your account details on devops_tools@microsoft.com.
Hi, I am unable to email account details with error:
Your message to sadadirs@microsoft.com couldn't be delivered.
The group sadadirs only accepts messages from people in its organization or on its allowed senders list, and your email address isn't on the list. richard.torhan Office 365 sadadirs Sender Action Required Sender not allowed | richard.torhan | Office 365 | sadadirs | Sender | | Action Required | | | | | | | | | Sender not allowed richard.torhan | Office 365 | sadadirs Sender | | Action Required | | | | | | | | | | | Sender not allowed How to Fix It It appears you aren't in the same organization as the group (or a sub-group) you're sending to or your email address isn't on the group's allowed senders list. Ask the owner of the group to grant you permission to send to it, and then try again. If the group belongs to a different organization than yours, contact the organization's customer service department for assistance. If the group is in your organization and you don't know who the group owner is, you can find it by doing the following in either Outlook on the web or Outlook: · Open your Sent folder and select the original message. · If you're using Outlook on the web, select the group name located on the To or CC line. If you're using Outlook, double-click the group name located on the To or CC line. · In Outlook on the web, from the pop-up dialog box, choose Owner. In Outlook, choose Contact. The owner's name is listed under Owner. The owner of the group may have intentionally chosen to restrict who can send messages to it, and they may not want to adjust the existing restriction. In this case, you'll have to contact the group members by some other means, such as sending an email message to their individual email addresses or contacting them by phone. | How to Fix It | It appears you aren't in the same organization as the group (or a sub-group) you're sending to or your email address isn't on the group's allowed senders list. Ask the owner of the group to grant you permission to send to it, and then try again. If the group belongs to a different organization than yours, contact the organization's customer service department for assistance. If the group is in your organization and you don't know who the group owner is, you can find it by doing the following in either Outlook on the web or Outlook: | · Open your Sent folder and select the original message. · If you're using Outlook on the web, select the group name located on the To or CC line. If you're using Outlook, double-click the group name located on the To or CC line. · In Outlook on the web, from the pop-up dialog box, choose Owner. In Outlook, choose Contact. The owner's name is listed under Owner. | The owner of the group may have intentionally chosen to restrict who can send messages to it, and they may not want to adjust the existing restriction. In this case, you'll have to contact the group members by some other means, such as sending an email message to their individual email addresses or contacting them by phone. How to Fix It It appears you aren't in the same organization as the group (or a sub-group) you're sending to or your email address isn't on the group's allowed senders list. Ask the owner of the group to grant you permission to send to it, and then try again. If the group belongs to a different organization than yours, contact the organization's customer service department for assistance. If the group is in your organization and you don't know who the group owner is, you can find it by doing the following in either Outlook on the web or Outlook: · Open your Sent folder and select the original message. · If you're using Outlook on the web, select the group name located on the To or CC line. If you're using Outlook, double-click the group name located on the To or CC line. · In Outlook on the web, from the pop-up dialog box, choose Owner. In Outlook, choose Contact. The owner's name is listed under Owner. The owner of the group may have intentionally chosen to restrict who can send messages to it, and they may not want to adjust the existing restriction. In this case, you'll have to contact the group members by some other means, such as sending an email message to their individual email addresses or contacting them by phone.
I got the same email response, I'm hoping there are more people on that distribution list
No response in 6 days. @anshii03 Any status?
@TekuSP @ahoefling they receive the email, it's just a single mailbox deep in the alias tree that bounces, see https://github.com/MicrosoftDocs/vsts-docs/issues/7183 I've been in contact with the team through devops_tools@microsoft.com, so rest assured that they are reading your email :)
hi! any updates to when we will be able to see code coverage results in Azure DevOps? It is matter of day, weeks or months?
+1 on update?
Yep - would be interested to get an update as well.
I never got back from Microsoft and this topic is dead. I demand official response or I will reopen this issue.
@anshii03 Do we have an ETA on when this will come out of closed preview?
Apologies for the delay in response.
Right now, we don’t have an ETA to share on the new user experience feature for code coverage results. Due to some unforeseen circumstances, we are unable to enroll new users for the private preview as well at this time. Sorry !
We will get back with an update as soon as we are ready to roll this out more broadly for customers to try.
I have the same issue, my tab is empty but the files is generate in an artifact It doesn't even show me to download the results The code coverage tab empty
The code coverage report generate
And in the summary show this
@danieeis Welcome to the club. They don't care.
Any update on this? I'm seeing the HTML report artifacts are generated properly but the code coverage tab is not picking them up. Are there any workarounds to push that index.html down devops throat?
I stumbled across the same issue but was able to solve this with that configuration:
- task: PublishCodeCoverageResults@1
inputs:
summaryFileLocation: 'tests/coverage/cobertura-coverage.xml'
codeCoverageTool: 'Cobertura'
reportDirectory: 'tests/coverage/lcov-report'
The arguments codeCoverageTool
and reportDirectory
(containing html report) are not part of the official documentation: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results?view=azure-devops#arguments
However, auto-completion in vscode helped me.
I have tried a lot to solve his problem...
So first of all, the problem is the test task of the pipeline (in my case the DotNetCoreCLI@2 task). If this task collects the code coverage it is automatically published with the tests in the .coverage format. For some reason this push of the .coverage file is at the end of the pipeline (or job - this I do not know) and therefore overrides all the previously uploaded files.
Use a Coverage Tool like OpenCover and collect the code coverage with that instead of the collection via the test task with CodeCoverage collection on.
Example:
OpenCover.Console.exe -target:"dotnet.exe" -targetArguments:"test {solution.sln]" -output:"{outputDir}\OpenCover.xml"
Afterwards convert the OpenCover file via the ReportGenerator task into Cobertura format.
And after that you can publish it as usual via the PublishCodeCoverageResult task.
You might have to try arround a little but with that solution in mind it will work.
@joshmouch is this still open ?
@anshii03 @phanikmmsft any update on this ? Can you at least provide a workround in order to be able to see some code coverage results ? Currently i'm collecting code coverage by using the DotNetCoreCLI@2 task as you can see below :
I have a pipeline that is successfully generating a .coverage file artifact. However, nothing shows up in the "Code Coverage" tab. Based on a few other related threads I found, the file needs to be in a Jacoco format in order for that DevOps tab to work. So, I tried opening the .coverage file in note bad, and it's a binary file of some kind and I can't tell if it's in the correct format or not.
Here is the log from the Test and Publish steps:
And the publish coverage step: