问题描述
我正在使用xcode 11 beta在iOS 13.0设备上运行单元测试.执行完测试后,应在
内生成一个testsummeries.plist文件./用户/您的用户名/库/开发人员/Xcode/DerivedData/XXX/日志/测试/xxx.xcresult
对应的测试用例.
但是它只在.xcresult内部生成数据文件夹和info.plist文件.
所以我无法获得我已执行的测试用例的报告
在Xcode 10中,它可以正常工作,并且每次运行测试时,我都可以在DerivedData文件夹内的testsummeries.plist文件中查看测试状态.
1-我是否需要在xcode11 beta中进行配置,以便生成相同的内容?
2-在其他位置我可以得到测试用例报告吗?在此处输入图片描述
实际内容:
预期内容:
Apple已更改Xcode 11.0中testResultBundles的格式.新格式为bundle.xcresult.您可以使用-resultBundlePath ResultBundle.xcresult设置要输出的预期位置.
然后,您可以使用JSON格式提取结果,您可以使用新工具进行查询:
$ xcrun xcresulttool get --path ResultBundle.xcresult --format json
您可以在本演示文稿中找到有关支持该格式和工具的更多信息:
一些警告:
- 仅在Xcode 11和更高版本中可用
-
xcresulttool
将特定于生成结果的Xcode
I am running unit tests on iOS 13.0 device by using xcode 11 beta. After the test execution it should generate a testsummeries.plist file inside
/Users/YourUsername/Library/Developer/Xcode/DerivedData/XXX/Logs/Test/xxx.xcresult
for the corresponding test case.
But it is only generating data folder and info.plist file inside .xcresult.
So i am not able get my report of the test cases that i have executed
In Xcode 10 it was working properly and with each test run i was able to see my test status in testsummeries.plist file inside DerivedData folder.
1 - Do i need to configure something in xcode11 beta so that it will generate the same?
2 - Is there any other location where i can get the test case report?enter image description here
Actual content:
Expected content:
Apple has changed the format of testResultBundles in Xcode 11.0.The new format is a bundle.xcresult. You can set a expected location for this to be output by using -resultBundlePath ResultBundle.xcresult.
You can then extract the results in a JSON format that you can query using the new tool:
$ xcrun xcresulttool get --path ResultBundle.xcresult --format json
You can read find out more about the format and tools to support it in this presentation:
https://developer.apple.com/videos/play/wwdc2019/413
Slide 155 of the associated PDF appears to have the information you require:
some caveats:
- Only available in Xcode 11 and later
- the
xcresulttool
will be specific to the Xcode generating the results
这篇关于DerivedData中缺少TestSummeries.plist文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!