问题
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:
回答1:
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
来源:https://stackoverflow.com/questions/57471506/missing-testsummeries-plist-file-in-deriveddata