Support to get the test coverage in iOS7
Objective-C Matlab Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
App
GenerateTestCoverageFor_iOS7.xcodeproj
GenerateTestCoverageFor_iOS7
Tests
.gitignore
.travis.yml
GenerateTestCoverageFor_iOS7.podspec
Guardfile
LICENSE
Makefile
README.md

README.md

GenerateTestCoverageFor_iOS7 build coverage

Support to get the test coverage in iOS7.

Usage

Add to GenerateTestCoverageFor_iOS7 subdirectory to your project

and change your build settings.

  • Instrument Program Flow: Yes
  • Generate Test Coverage Files: Yes

Advanced Usage

CUI test command sample

xcodebuild test \
    -scheme Tests \
    -destination "name=iPhone Retina (4-inch 64-bit),OS=7.0" \
    GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES \
    GCC_GENERATE_TEST_COVERAGE_FILES=YES \
    OTHER_CFLAGS="-DUSE_GCOV_FLUSH"

Send to Coverstory

xcodebuild test \
    -scheme Tests \
    -destination "name=iPhone Retina (4-inch 64-bit),OS=7.0" \
    OBJROOT=tmp \
    GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES \
    GCC_GENERATE_TEST_COVERAGE_FILES=YES \
    OTHER_CFLAGS="-DUSE_GCOV_FLUSH"

/Applications/CoverStory.app/Contents/MacOS/CoverStory tmp

When you don't want to call __gcov_flush()

#define UNUSE_GCOV_FLUSH //< -DUNUSE_GCOV_FLUSH

But USE_GCOV_FLUSH takes precedence over UNUSE_GCOV_FLUSH.

Setup

Using CocoaPods

// Podfile
target :YourTestsTarget do
  pod 'GenerateTestCoverageFor_iOS7'
end

and

pod install

Install manually

Add GenerateTestCoverageFor_iOS7 subdirectory to your project.