Xcode 7.0 和 7.1,代码覆盖开启,单元测试崩溃 "cannot merge previous GCDA file: corrupt arc tag"

标签 xcode unit-testing code-coverage xcode7

我们从 起就一直有这个问题Xcode 7 测试版 并且问题一直持续到今天 Xcode 7.1 .

基本上我们无法在 Xcode 中打开代码覆盖率。在 Xcode 6 中,这运行良好,但从 Xcode 7 开始就被破坏了。在单元测试运行结束时,我们得到无限的控制台输出说:

profiling: /Users/<my path to app>/ObjectiveC.gcda: cannot merge previous GCDA file: corrupt arc tag (<some hex address>)

此输出重复,直到应用程序 崩溃 .我只是不知道为什么会发生这种情况,并且所有解决此问题的尝试都失败了(除了关闭检测程序流和关闭代码覆盖率)。我什至尝试设置一个构建阶段运行脚本来查找并清除以前的代码覆盖率文件,但这也不起作用。

有没有人想过这个?

最佳答案

谢谢 @gagarwal为方向。由于需要旧的代码覆盖率文件,我只需要找出不同的 jenkins 报告工具,但我想这不再受支持。以下是一些屏幕截图,用于说明根据 gagarwal 的建议生成可在 Xcode 中查看的代码覆盖率报告的设置:

----------------------        
main app target config
----------------------

enter image description here
enter image description here
----------------------
test app target config
----------------------

enter image description here
enter image description here
------------------------------------------
Scheme config (see "Gather coverage data")
------------------------------------------

enter image description here

关于Xcode 7.0 和 7.1,代码覆盖开启,单元测试崩溃 "cannot merge previous GCDA file: corrupt arc tag",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33289254/

相关文章:

ios - XCode——我什么时候使用开发人员配置文件和分发配置文件进行签名?

xcode - 如何使用 Firebase Swift 3 创建 CompletionHandler

python - 即使引发了 ValidationError,表单在单元测试中仍然有效

javascript - 单元测试 nodejs 事件

android - 使用 TeamCity 构建 android 项目 - 测试和代码覆盖问题

ios - 无法在 ios 模拟器上检测方向?

c++ - xcode 包含路径冲突

ios - UICollectionView 单元测试 dequeueReusableCellWithReuseIdentifier 上的错误访问

swift - 如何在具有 100% 代码覆盖率的 Xcode 单元测试中编写 do {} catch {}

c - 是否有适用于 Windows 的免费 C 测试代码覆盖工具?