Coder Social home page Coder Social logo

alcove's Introduction

Alcove Gem Version Build Status Code Climate Test Coverage

Painless code coverage reporting for Objective-C projects. Most of the heavy lifting is done by the venerable lcov. Alcove simply searches the nooks and crannies to collect the data needed to generate the report and ties everything together for you. Best of all, it's a gem with minimal dependencies, so installation is quick and painless.

Installation

$ gem install alcove

You'll also need to install lcov.

With Homebrew:

$ brew install lcov

Or with MacPorts:

$ sudo port install lcov

Xcode Project Configuration

Open your project in Xcode and update your non-test targets to Generate Test Coverage Files and Instrument Program Flow (for Debug configuration only). Xcode

Generating Reports

Now that you have the prerequisites out of the way, you can generate a report. Make sure you've recently executed your tests, then:

alcove --product-name <your-product-name>

Options

--output-directory

Specify this option to change the output directory for the report. Any intermediate paths will be created.

--percent-file

Generates a plaintext file alcove-percent.txt in the output directory, containing only the line coverage percentage.

--product-name

The product name specified in your Xcode project.

--remove-filter

A list of filters to use when gathering files for the report. Use this if you want to exclude certain files from the report. For example: alcove --product-name SampleProduct --remove-filter *.h,main.m will exclude header files and the main.m file from the report.

--search-directory

Use this option to specify the directory to be searched for your product. Alcove plays nicely with the the structure on your development machine, as well as on an Xcode Server, but if you have some funky output directory for your build, you can specify its parent here.

Troubleshooting

If something doesn't seem quite right, try cleaning the build folder and then run the tests again. Make sure you can generate a report for the demo project, too.

Thanks

Shoutout to @NateBank for the name suggestion and inspiration.

alcove's People

Contributors

voidrender avatar

Watchers

John Kelly avatar Steve Collins avatar John Kearney avatar James Cloos avatar Andrew Betson avatar Sergio Mira Muñoz avatar  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.