GithubHelp home page GithubHelp logo

sundance2000 / xcodecoverageconverter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twittemb/xcodecoverageconverter

0.0 0.0 0.0 73 KB

XcodeCoverageConverter aims to provide a tool to convert xccov code coverage results into continuous integration friendly formats

License: MIT License

C 0.29% Swift 99.52% Makefile 0.18%

xcodecoverageconverter's Introduction

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

  • 1: Generate code coverage data when unit testing. You have to add the following options to the xcodebuild command line: -derivedDataPath Build/ -enableCodeCoverage YES
  • 2: Generate JSON from the code coverage data: xcrun xccov view --report --json Build/Logs/Test/*.xcresult > coverage.json
  • 3: Run xcc to convert the report into a Cobertura XML file: /usr/local/bin/xcc generate coverage.json . cobertura-xml --exclude-packages Tests (this command excludes the Tests package from the export)

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:

  • cobertura XML: cobertura-xml
  • sonarqube XML: sonarqube-xml

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.

xcodecoverageconverter's People

Contributors

twittemb avatar galarius avatar thedavidharris avatar bmwalters avatar gredman avatar chkpnt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.