I am using the latest stable release of the plugin (0.19.1) and I've just upgraded my Xcode installation from 10.3 to 11.0. I'm seeing that the plugin's xcodetest task is able to run the tests in my project but it's no longer able to parse the output produced by Xcode in order to produce a test-results.xml file. The file is produced but its contents are as follows:
<testsuites />
On inspection of the derivedData/Logs/Test folder I can see that the two versions of Xcode create the test output differently, as follows:
Xcode 10.3: a derivedData/Logs/Test/Test-<project name>-<date>-<time>.xcresult result bundle is produced which contains a TestSummaries.plist file.
Xcode 11.0: a derivedData/Logs/Test/Test-<project name>-<date>-<time>.xcresult result bundle is produced which does not contain a TestSummaries.plist file.
The format of result bundles changed in Xcode 11. A result bundle is an asset produced by Xcode 11 with the xcresult file extension that contains information about the build, tests, code coverage, and more. Any xcresult files produced with Xcode 10 or earlier cannot be read by Xcode 11. A result bundle can be produced by passing -resultBundlePath ./Example.xcresult to an xcodebuild invocation and the Example.xcresult can then be opened in Xcode. Xcode also creates result bundles in Derived Data. The current result bundle version number is 3, which can be specified by passing the xcodebuild flag -resultBundleVersion 3. Version 3 is the default in Xcode 11, but it is still recommended for automation to explicitly pass the flag, so that any potential future versions that become the default do not cause issues to existing tools. Result bundles can be inspected using xcresulttool. A JSON representation of the root object of the result bundle can be exported using xcrun xcresulttool get --format json --path ./Example.xcresult and any nested object, identified by its reference found in the JSON output, can be exported by adding the flag --id REF. xcresulttool also provides the description of its format using xcrun xcresulttool formatDescription. (41633595)
I am using the latest stable release of the plugin (0.19.1) and I've just upgraded my Xcode installation from 10.3 to 11.0. I'm seeing that the plugin's
xcodetest
task is able to run the tests in my project but it's no longer able to parse the output produced by Xcode in order to produce atest-results.xml
file. The file is produced but its contents are as follows:On inspection of the
derivedData/Logs/Test
folder I can see that the two versions of Xcode create the test output differently, as follows:derivedData/Logs/Test/Test-<project name>-<date>-<time>.xcresult
result bundle is produced which contains aTestSummaries.plist
file.derivedData/Logs/Test/Test-<project name>-<date>-<time>.xcresult
result bundle is produced which does not contain aTestSummaries.plist
file.The following paragraph in the Xcode 11 release notes describes the change: