twittemb / XcodeCoverageConverter

XcodeCoverageConverter aims to provide a tool to convert xccov code coverage results into continuous integration friendly formats
MIT License
43 stars 11 forks source link

XcodeCoverageConverter

This tool aims to convert Xcode generated code coverage data into CI friendly formats.

Please execute xcc generate --help for all options.

Installation

brew install twittemb/formulae/Xcodecoverageconverter

From xccov JSON to Cobertura XML

The XML output can then be uploaded to your CI provider as an artefact. It has been sucessfully tested with Azure DevOps pipelines.

Output formats

xcc currently supports these output formats:

You can specify several output formats in the CLI /usr/local/bin/xcc generate coverage.json . cobertura-xml sonarqube-xml

Contribution

PR are of course welcome. To add new input or output formats, please refer to how Decoders and Converters are implemented.

Credits

This tool is based on the following gist:

https://gist.github.com/csaby02/ab2441715a89865a7e8e29804df23dc6

Thanks to its author.