Unable to convert opencoverxml file into corbertura.xml file using ReportGenerator in Azure Devops Pipeline
SatheshSelvaraj opened this issue · 3 comments
Hi All,
We are working on TSQL code coverage, and successfully generated the opencoverxml file using powershell task. But we are unable to convert the opencoverxml file into cobertura file to publish into SonarQube report, its missing with line of coverage data while using the report generator tool via Azure DevOps pipeline. Can you please assist on this request.
To Reproduce
The following input helps to reproduce your issue:
- Console output of ReportGenerator, we have create the task to convert opencoverxml to Cobertura.
![Screenshot pipeline task](https://private-user-images.githubusercontent.com/163382758/312715289-4c6db40a-de6f-428d-9f5d-1baf2f57281f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM3OTYwODUsIm5iZiI6MTcxMzc5NTc4NSwicGF0aCI6Ii8xNjMzODI3NTgvMzEyNzE1Mjg5LTRjNmRiNDBhLWRlNmYtNDI4ZC05ZjVkLTFiYWYyZjU3MjgxZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQyMlQxNDIzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNzAwMWJjOTljMjQxODAwY2Y5YTYyYzcxMjgwYjY0YzI5N2FmNjcyZTNlYTY2ZmU3MjZhZmY0ZDRlZTk1NGVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9._V18bZQS--H3NSqQ2-Ow5i7S8ohtao7e2BmWykWg0IQ)
post conversion the line of code is not covered and piblished.
The output file that we are getting through HTML and XML, but it is unable to convert into Cobertura file using report generated. We can able to publish the code coverage only if it is converted into cobertura.
- If the issue is related to a specific coverage file which gets parsed by ReportGenerator, you can share the file:
Opencover XML file send through the Email
Thanks for your sample files.
The problem is/was that the listed files in the OpenCover file do not exist on disk (e.g. [dbo].[sp_alterdiagram]
).
Therefore ReportGenerator
is not able to read the file which resulted in an empty <lines />
element.
I changed the behavior now. If a file does not exist at least the lines from the OpenCover file are represented in the Cobertura output.
Please try again. And I would be happy if you update your review to 5 stars :-)
Hi danielpalme,
Thank you for your help.
We are able to publish the correct report now.
Much appreciated on your kindly support.
Thanks
Awesome!