DerivedData 中缺少 TestSummeries.plist 文件

Abi*_*hoo 2 testing ios13 xcode11

我正在使用 xcode 11 beta 在 iOS 13.0 设备上运行单元测试。测试执行后,它应该在里面生成一个 testsummeries.plist 文件

/Users/YourUsername/Library/Developer/Xcode/DerivedData/XXX/Logs/Test/xxx.xcresult

对应的测试用例。

但它只在 .xcresult 中生成数据文件夹和 info.plist 文件。

所以我无法得到我执行的测试用例的报告

在 Xcode 10 中,它工作正常,每次测试运行时,我都能在 DerivedData 文件夹内的 testsummeries.plist 文件中看到我的测试状态。

1 - 我是否需要在 xcode11 beta 中配置一些东西才能生成相同的东西?

2 - 是否还有其他地方可以获得测试用例报告?在此处输入图像描述

实际内容:

实际的

预期内容:

预期的

abl*_*arg 5

Apple 在 Xcode 11.0 中更改了 testResultBundles 的格式。新格式是 bundle.xcresult。您可以使用 -resultBundlePath ResultBundle.xcresult 设置要输出的预期位置。

然后,您可以以 JSON 格式提取结果,您可以使用新工具进行查询:

$ xcrun xcresulttool get --path ResultBundle.xcresult --format json

您可以在此演示文稿中阅读以了解更多有关支持它的格式和工具的信息:

https://developer.apple.com/videos/play/wwdc2019/413

相关 PDF 的幻灯片 155 似乎包含您需要的信息:

在此处输入图片说明

一些警告:

  • 仅适用于 Xcode 11 及更高版本
  • xcresulttool将特定于Xcode的生成结果