Coder Social home page Coder Social logo

xcoverage's Introduction

XCoverage

Xcode Plugin that displays coverage data in the text editor

Example

###Menu options: Menu options

  • Quickly toggle with keyboard shortcut CMD+Shift+\
  • By default the plugin will try and find your coverage files, however for the best performance/reliability you can set your own location. The plugin will then use this location and recursively search it for your coverage file matching the source file you are viewing.

###Installation instructions: Install via Alcatraz

OR

Open the project in XCode and build it. This should auto-install it for you and just restart XCode to begin using!

To uninstall, delete the XCoverage directory from ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins

###See test app for example

  • If you run the unit tests for the test app (CMD+U) then you will generate coverage data for the ViewController

###Generating coverage data This plugin does not actually generate coverage data for you, since there are various workflows that people use to do this. However if you don't currently have coverage data, the sample app includes some build scripts that can help you get started.

#####Steps: #####1. Enable project settings to begin generating coverage information

#####2. Setup the export_build_vars.py script in build phases

This script is used to export any necessary environment variables from your latest build. The main reason this is needed is that many of the env variables at run-time are completely different in unrelated to your most recent build. They are also usually relative paths instead of absolute like these build variables.

Export build vars

#####3. Add pre-action script to the test section of your scheme

This script will clear any previous .gcda files from your target_object_dir, which helps ensure that this test run will be isolated in the coverage data.

Pre-action

#####4. Add post-action script to the test section of your scheme

This script will run gcov on all of your gcda files generated by your tests running in the app, generating .gcov files to be parsed by the plugin.

Post-action

xcoverage's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcoverage's Issues

Trying to run the sample app does not display code coverage

I downloaded the latest source code, built the plugin locally, restarted Xcode, clicked on view > Xcodecoverage > show code coverage to turn it on, ran the unit test.

in the OS X console, i get the following:
6/1/15 10:45:48.979 Xcode[95690]: COVLog Show coverage tapped.
6/1/15 10:45:48.980 Xcode[95690]: COVLog Doing an auto search.
6/1/15 10:45:49.180 Xcode[95690]: COVLog Looking in relative path
6/1/15 10:45:49.181 Xcode[95690]: COVLog generating coverageMap

But no coverage is displayed in Xcode

Xcode 6.3.2, MacOSX 10.10.3

Unit test target and logic test target

In our project we have two test targets. One is a unit test target and the other one a logic test target. The unit test target does not run the application and the gcda files for this target are saved in the unit_test.build by Xcode. On the other hand the logic test target gcda files are saved within the application build folder.

So when the plugin parses the gcda files to generate the code coverage, it misses the unit test information.
In the build_var file, object_file_dir is set to application.build/Objects-normal/x86_64
What can i do for the plugin to see both source of bcda files?

No troubleshooting instructions

I can't get the coverage to work on my larger project and can't find any trouble shooting instructions. Would be great to have pointers to be able see what is not working.

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.