Code Coverage with iOS apps
Code Coverage with iOS apps
- Subject: Code Coverage with iOS apps
- From: Paul Summermatter <email@hidden>
- Date: Wed, 09 Jan 2013 13:36:09 -0500
Folks,
I'm trying to figure out what the current state of the art is with respect to code coverage in Xcode. I've been bouncing all over the place with Google searches, finding some recent information and other information that is likely out of date. The information seems to be split between whether you are running GCC or LLVM. I am running Xcode 4.5.1 with LLVM. Based on some information I have found, it seems like getting coverage information with LLVM should be as simple as turning on two flags in your target: "Instrument Program Flow" and "Generate Test Coverage Files". I have both of these set to Yes for a GHUnit target that I have, but, when I build and run my unit tests, I never see any gcov or gdca files anywhere in the build directory (these are unit tests for an iOS app that runs in the simulator). I'm right clicking on the product in Xcode and choosing Reveal in Finder and then navigating up the path to the Build dir. I'm then dragging that into terminal and doing a cd. I then execute various variants of the following:
find . -name "*gcda*" -print
I've tested to make sure I find files such as *dSYM, but no gcda or gcov files seem to be created anywhere in the Build directory. I'm not sure how/if I can troubleshoot this further.
I've seen a lot of other posts out there about coverage working or not working for people in various versions of Xcode, and I'm getting lost in something that I would have hoped would be a lot easier. In IDEA, I click one button and this is done right in the IDE without any special effort on my part. Is this possible yet in Xcode or do I need to dig in and prepare for a much tougher slog here? If there is official Apple documentation somewhere on how to do this, I haven't found it yet, but if anyone can please direct me, I will gladly go RTFM.
Regards,
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden