user831098
user831098

Reputation: 1823

Can not run unit test on device - Code Coverage Data Generation Failed (IOS)

When run the unit test on my iPad, I get the error as below(Xcode7). Can someone facing same problem, how to solve it?

Code Coverage Data Generation Failed

Unable to retrieve the profile data files from 'iPad'.

Besides that, will also pop up the message as below:

Setting up profile generation failed

Xcode could not generate profile information for bundle identifier (com.xxxx.merchant). The profile path was missing. The environment variables were valid.

Upvotes: 4

Views: 1484

Answers (2)

Perlguy
Perlguy

Reputation: 1082

The above didn't work for me. However, I noticed that my KIF.framework wasn't getting loaded, so the test target was actually not getting properly built.

Fixing the issue with the framework file also fixed the issue with the test coverage for me.

Upvotes: 1

fruitmoona
fruitmoona

Reputation: 71

1.Edit your project scheme->Test->Info->deselect "Gather coverage data"

2.Product Clean, also clean build folder

3.Close Xcode, restart Xcode

4.delete app on your device and restart your device(might be optional)

There appears to have bug with code coverage, hence the key to bypass this bug is to disable "Gather coverage data" for now, hope this helps.

Upvotes: 7

Related Questions