-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to present code coverage report on Azure DevOps #29
Comments
From @wli3 on Wednesday, April 8, 2020 8:10:43 PM Sorry there is not test coverage on CLI today |
From @eluchsinger on Wednesday, May 6, 2020 7:21:26 AM So what does the There are so so many guides explaining how to collect code coverage and all of them just post commands without explaining what they do exactly. I have not found one single best practice approach in Microsoft's multiple Docs about Code Coverage. Can we get an official advice on how to do Code Coverage? I know it's possible, what I don't know is how I should do it. |
AFAIK you can publish the coverage report with the |
I think that is a good point. Many guides says to use cobertura format instead of .coverage and with the ReportGenerator task is possible to presents a visual report in the build "Code coverage" tab (instead of that "Download code coverage results"). |
I recently noticed that now the DotNetCoreCLI@2 task with command: test and publishTestResults: true just pubblish the coverage in the Coverage tab of the pipeline. Is nice, not perfect, but nice. In my case I have this pipeline:
And I see this: The bad thing here is that this include external NuGet packages (like Redis, fluentvalidation, moq, etc...) and also my Tests projects (as pointed out also here).... but it's still something. There is another way, but is using cobertura coverage format, or multiple pipelines... I wrote somethings here. |
I think this issue can be closed now. Right? @jakubch1 |
From @SergiyKostenko on Sunday, March 22, 2020 4:25:08 PM
Hello,
Is there way to present code coverage report using DotNetCoreCLI@2 test command?
Documentation (https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core?view=azure-devops&tabs=yaml#collect-code-coverage) says
The .coverage file can be downloaded from the build summary for viewing in Visual Studio. Howewer, it is not handy to download it. I would prefer to see it on tab? Is it possible with default dotnet cli?
Copied from original issue: dotnet/sdk#10962
The text was updated successfully, but these errors were encountered: