SonarSource / sonar-scanning-examples

Shows how to use the Scanners
GNU Lesser General Public License v3.0
886 stars 2.19k forks source link

Unable to import Xcode Coverage data on XCode 12 #94

Closed danielmaion-zz closed 3 years ago

danielmaion-zz commented 3 years ago

Hi,

We are getting this error when running xccov-to-sonarqube-generic.sh script on XCode 12 to generate XML coverage file. Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load result bundle" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7fc20a10a960 {Error Domain=IDEFoundation.ResultBundleError Code=0 "This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API."}}

Do we have an update regarding the new XCode version?

I'm running the script as shown: ./xccov-to-sonarqube-generic.sh "/DerivedData/Logs/Test/*.xcresult" > sonarqube.generic-coverage.xml

XCode Version 12.0.1 (12A7300)

shoaibsadanaut commented 3 years ago

Is this resolved? I am facing similar issue.

eexe1 commented 3 years ago

I was able to import coverage data from Xcode 12.1 by using this tool: https://github.com/mysugr/cococo

uncletomiwa commented 3 years ago

I was able to import coverage data from Xcode 12.1 by using this tool: https://github.com/mysugr/cococo

But the tool is now deprecated and no longer supported by the author

d4rkd3v1l commented 3 years ago

Any updates on this?

Just ran into this issue using Xcode 12.5 beta 3 (12E5244e).

d4rkd3v1l commented 3 years ago

Got it working, using a specific path, without any wildcards (*).

./xccov-to-sonarqube-generic.sh Build/Logs/Test/Run-timeARC-2021.03.07_16-47-34-+0100.xcresult > sonarqube.generic-coverage.xml

okorach commented 3 years ago

This repo is a sample of how to scan projects. If you have problems on your own projects please post on the SonarSource community forum, not here. See https://community.sonarsource.com