Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code coverage for Xcode 5 and iOS 7

0d04162c7a3c2907c059a06dbcd23cf4?s=47 tokorom
December 11, 2013

Code coverage for Xcode 5 and iOS 7

0d04162c7a3c2907c059a06dbcd23cf4?s=128

tokorom

December 11, 2013
Tweet

More Decks by tokorom

Other Decks in Technology

Transcript

  1. 9DPEFJ04 Ͱ΋ ίʔυΧόϨοδͱ͔ औΓ͍ͨʂ @tokorom Wednesday, December 11, 13

  2. ͜ΕͷJ04൛ Wednesday, December 11, 13

  3. 9DPEFYҎલͷ ςετ࣮ߦ xcodebuild \ -project $(PROJECT) \ -target $(TEST_TARGET) \

    -sdk iphonesimulator \ -configuration Debug \ TEST_AFTER_BUILD=YES \ TEST_HOST= Wednesday, December 11, 13
  4. 9DPEFҎ߱ͷ ςετ࣮ߦ xcodebuild test \ -scheme $(SCHEME) \ -destination $(DESTINATION)

    Wednesday, December 11, 13
  5. 9DPEFͷ YDPEFCVJME͸ େ෯ύϫʔΞοϓʂ Wednesday, December 11, 13

  6. ίʔυΧόϨοδ Wednesday, December 11, 13

  7. YYYHDOPYYYHDEB GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES \ GCC_GENERATE_TEST_COVERAGE_FILES=YES Wednesday, December 11, 13

  8. J04Ͱ͸͏·͍͘͘ͷʹ Wednesday, December 11, 13

  9. J04Ͱ͸ YYYHDEB͕ ग़ͳ͍ Wednesday, December 11, 13

  10. ࣗ෼Ͱ͜ΕΛݺ͹ͳ͍ͱ μϝΒ͍͠ extern void __gcov_flush(void); __gcov_flush(); Wednesday, December 11, 13

  11. ͍ͭݺͿͷʁ Wednesday, December 11, 13

  12. ࠓ Ͱ͸ͳͯ͘ ςετ͕શ෦ ࣮ߦ͠ऴΘͬͨޙ Wednesday, December 11, 13

  13. 9$5FTU0CTFSWFS Wednesday, December 11, 13

  14. 9$5FTU0CTFSWFS NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:@"XCTestLog,XXXObserver" forKey:XCTestObserverClassKey]; [defaults

    synchronize]; Wednesday, December 11, 13
  15. 9$5FTU0CTFSWFS @interface TKRGcovFluserTestObserver : XCTestObserver @end @implementation XXXObserver - (void)stopObserving

    { [super stopObserving]; extern void __gcov_flush(void); __gcov_flush(); } @end Wednesday, December 11, 13
  16. ݱঢ়ͷ೰Έ ˙ී௨ʹ΍ΔͱHDOP͔͠ग़ͳ͍ ˙@@HDPW@qVTI ͢ΔͱHDEB͔͠ग़ͳ͍ ˙ࠓ͸ɺී௨ʹςετ૸Βͤͯɺ ࣍ʹ@@HDPW@qVTI ෇͖Ͱ૸ΒͤͯΔʢແବʣ Wednesday, December 11,

    13
  17. ಈ͍͍ͯΔαϯϓϧ http://github.com/tokorom/ReplaceImageCategoryForXcode Wednesday, December 11, 13