Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 475
user831098 Avatar asked Feb 07 '23 08:02

user831098


1 Answers

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.

like image 50
fruitmoona Avatar answered Feb 13 '23 06:02

fruitmoona