Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Xcode Plugin that displays coverage data in the text editor

![Example](https://github.com/dropbox/XCoverage/raw/master/docs/example.png)

###Menu options:
### Menu options:
![Menu options](https://github.com/dropbox/XCoverage/raw/master/docs/menu.png)
- 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:
### Installation instructions:
Install via [Alcatraz](https://github.com/supermarin/Alcatraz)

OR
Expand All @@ -17,31 +17,31 @@ Open the project in XCode and build it. This should auto-install it for you and

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

###See test app for example
### 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
### 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
##### Steps:
##### 1. Enable project settings to begin generating coverage information
- Make build setting for Generate Debug Symbols set to YES
- Make build setting for Instrument Program Flow to YES
(See more info at https://developer.apple.com/library/ios/qa/qa1514/_index.html)

#####2. Setup the export_build_vars.py script in build phases
##### 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](https://github.com/dropbox/XCoverage/raw/master/docs/export-build-vars.png)

#####3. Add pre-action script to the test section of your scheme
##### 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](https://github.com/dropbox/XCoverage/raw/master/docs/pre-actions-setup.png)

#####4. Add post-action script to the test section of your scheme
##### 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.

Expand Down