GenerateTestCoverageFor_iOS7 icon indicating copy to clipboard operation
GenerateTestCoverageFor_iOS7 copied to clipboard

Support to get the test coverage in iOS7

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.