-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Support Cobertura as Code Coverage Report Format #2203
Comments
I don't have a capacity to implement this myself right now. Putting for adoption from community. I think this a good first issue to solve even though the scope is a bit big if this is your first PR ever. There is already code that creates jacoco format and cobertura would be similar hopefully. |
I found where the JaCoCo generation code is. Pester/src/functions/Coverage.ps1 Line 805 in 6e8eb89
As Cobertura is another XML-based coverage format, I'm hoping it wouldn't be too hard to implement. I did find the Cobertura DTD files which describe the format: https://github.com/cobertura/cobertura/tree/master/cobertura/src/site/htdocs/xml That being said, I'm not sure which version of Cobertura we would want to support. The Cobertura output I get from Jest JavaScript unit tests (via jest-junit) shows as coverage-04.dtd, so perhaps that would be a good place to start as I already know that it is supported by tools like ReportGenerator and Azure Pipelines. Thoughts? If I get a chance I may take a crack at it since I could really use this functionality. |
Searching around the web it seems JaCoCo seems to be generally widely supported in CI and tools, so as long as the Cobertura-version is compliant with Gitlab which requires conversion atm, then it should be fine I guess. 🙂 Really weird how they keep delaying the JaCoCo-support (ETA Q2'24 for now). |
Yeah, seems like Cobertura is still a preferred format in the JS world, as that's one of the most commonly referenced output formats when I'm looking into Jest code coverage. Unfortunately I haven't found any JaCoCo format plugin for Jest... It would be nice if all the code ecosystems could agree on some kind of uniform standard LOL! |
Checklist
Summary of the feature request
Hi,
we are internally using Gitlab CI for all our powershell stuff. Gitlab only supports Cobertura as code coverage report format (See Gitlab Test Coverage). Pester internally only supports 'JaCoCo' or 'CoverageGutters'. I have read a few other issues like this #212 (comment) about the implementation of cobertura and other formats.
Could you please add a cobertura compatible Code Coverage Report format like JaCoCo in Pester?
(The TestResult Format
JUnitXml
is already supported in gitlab.)Thanks,
René
How should it work?
No response
The text was updated successfully, but these errors were encountered: