Open tovkal opened 3 years ago
Make sure:
Enable Testability: True
Example of project building:
xcodebuild \
-project yourproject.xcodeproj/ \
-scheme yourproject \
-derivedDataPath Build/ \
-enableCodeCoverage YES \
-destination 'platform=iOS Simulator,name=iPhone 12,OS=15.4' \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
ONLY_ACTIVE_ARCH=YES \
VALID_ARCHS=x86_64 \
clean \
build \
test
Slather generator:
slather coverage --sonarqube-xml \
--build-directory Build \
--output-directory sonar-reports \
--scheme yourproject yourproject.xcodeproj
Is there any updates on this one ? we started getting the same error when running on Xcode 16 beta.
We have similar issues when build with Xcode 16 beta 4:
error: Failed to load coverage: 'XXXXXX': No coverage data found
error: Could not load coverage information
Any updates from this one?
Even I am facing same issue. This is working on xCode 15.4 and older but xCode 16 beta 5, I am getting same error. let me know if anyone know any solution for this.
I can't test this issue myself (If I upgrade beyond XCode 15.1 currently, it will break things for me at work), but if anyone running XCode 16 can get any more detailed information about what has changed in XCode between 15.x and 16, that could help. There was a breaking change in the LLDB version XCode was using between XCode 14.2 and 14.3 that broke lots of things, so maybe they did something similar between XCode 15 and 16.
I am getting this error on targets that have no coverage because they have no tests and don't know if this is expected behavior or not.
I am trying to run slather on a multi module project, all living under one workspace. The command I am running (by using the fastlane plugin) is a more complex version of the following, where I pass all targets I want coverage on as
--binary-basename
parameters.slather coverage --sonarqube-xml --build-directory DerivedData --output-directory DerivedData/slatherOutput --ignore Pods/\* --ignore Frameworks/\* --scheme MyApp-ALL-TESTS --workspace ./MyApp.xcworkspace --binary-basename MyApp --binary-basename SomeModule ./MyApp.xcodeproj
Is there a way to tell slather to ignore targets with no coverage, to avoid the error?