<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Heinzl on Medium]]></title>
        <description><![CDATA[Stories by Michael Heinzl on Medium]]></description>
        <link>https://medium.com/@michael.heinzl?source=rss-b215937d098a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*H8_6XJ7vWAmr5xBOSpo2eA.jpeg</url>
            <title>Stories by Michael Heinzl on Medium</title>
            <link>https://medium.com/@michael.heinzl?source=rss-b215937d098a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 23:43:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@michael.heinzl/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[cococo — Code Coverage Converter from Xcode 11 to SonarQube]]></title>
            <link>https://medium.com/monsterculture/cococo-code-coverage-converter-from-xcode-11-to-sonarqube-7f48cff97b9b?source=rss-b215937d098a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f48cff97b9b</guid>
            <category><![CDATA[sonarcloud]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[code-coverage]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Michael Heinzl]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 10:33:59 GMT</pubDate>
            <atom:updated>2020-02-06T10:33:59.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>cococo — Code Coverage Converter from Xcode 11 to SonarQube</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUUkZ8X34V7nxTCsW3vUgg.jpeg" /></figure><p><strong>TL;DR:</strong> Use c<a href="https://github.com/mysugr/cococo">ococo</a> to speed up your conversion from Xcode 11’s code coverage data to SonarQube’s generic XML format.</p><h3><strong>Why do we need to convert our </strong>code coverage data<strong>?</strong></h3><p>So, let’s start with the basics: SonarQube (SonarCloud) provides us with code analysis tools to keep track of our code quality including code smells, potential bugs and test coverage. Unfortunately, SonarQube does not support Xcode’s code coverage data directly so it has to be converted to their <a href="https://docs.sonarqube.org/latest/analysis/generic-test/">generic XML format</a>. Before Xcode 11, we just used the <a href="https://github.com/SonarSource/sonar-scanning-examples/blob/master/swift-coverage/swift-coverage-example/xccov-to-sonarqube-generic.sh">shell script</a> provided by SonarQube to convert Xcode’s code coverage data to their generic XML format. It wasn’t super fast but it got the job done.</p><h3>Now, what has changed?</h3><p>As SonarQube’s code analysis is part of our Continuous Integration (CI) pipeline, we want to avoid the process of converting to take a lot of time. With Xcode 11 however, Apple changed the file format of its code coverage data. 🙈 Therefore, SonarQube updated its shell script to work with the new format. Including the updated shell script into our workflow led to an increase in the build time of our CI pipeline by 20 minutes! 😭 This wasn’t only affecting us — other people in the community also faced increased build times up to 2 hours, depending on how big their project is. This was the moment when I decided to take a closer look at the shell script and re-wrote it in Swift.</p><h3>The solution</h3><p><a href="https://github.com/mysugr/cococo">https://github.com/mysugr/cococo</a></p><p>cococo is a command-line tool for macOS. By implementing it, we managed to decrease the conversion time on our CI pipeline from 25 to 4 minutes. 🚀</p><p>cococo still uses xcrun xccov to extract the code coverage data from the xcresult archive. Basically, it does the same thing as the old shell script but instead of processing the coverage data file by file on a single thread, cococo leverages multiple threads to distribute the workload.</p><p><em>Usage:</em></p><pre>$ cococo myproject.xcresult &gt; sonarqube-generic-coverage.xml</pre><p>You can download the binary from the latest release on Github: <a href="https://github.com/mysugr/cococo/releases/latest">https://github.com/mysugr/cococo/releases/latest</a></p><p>To summarize, Xcode 11 changed the format of its code coverage data. 😓 If you are using SonarQube (SonarCloud) to analyze your project’s test coverage and if you are also facing performance issues when converting Xcode 11’s code coverage data: Give <a href="https://github.com/mysugr/cococo">cococo</a> a try! 😉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f48cff97b9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/monsterculture/cococo-code-coverage-converter-from-xcode-11-to-sonarqube-7f48cff97b9b">cococo — Code Coverage Converter from Xcode 11 to SonarQube</a> was originally published in <a href="https://medium.com/monsterculture">Monster Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>