fastlane-community/xcov

xcov .xcresult file and cobertura xml

cristianbanarescu opened this issue · 0 comments

Hi all! I am using xcov in order to get my code coverage results and put them inside a JSON file. Then i use a Swift script to generate an XML (from the JSON ) for Cobertura plugin for an Azure Dev Ops pipeline. The problem is that my XML format is not recognised by the pipeline plugin 'Publish code coverage'.

I am using xcov like this:

xcrun xcov -w ../MyProject.xcworkspace -s MyTarget -j ../../testOutput/ view ../../testOutput/Logs/Test/.xcresult --json > testReport.json -f ../../testOutput/Logs/Test/.xcresult --only_project_targets

It seems like from XCode 10, when running xcov, the output is NO longer an .xccovreport file so my swift script is messed up because the output of my XCOV command produces a JSON with different structure than when having been generated from .xccovreport file :(

Any ideas about how i should manage to do this ? I saw some post related to somehow 'extracting' .xccovreport file from .xcresult bundle but i did not manage to succeed in doing this.

Thanks !