Code Coverage Not Accurate in Xcode 26

Description: I’m noticing that the code coverage metrics in Xcode 26 are not accurate compared to earlier versions.

In Xcode 15, the same set of unit tests shows around 38% coverage, but in Xcode 26, even though all the tests are running successfully (for example, the SegmentedUI test cases), the code coverage is displayed as 0%.

Has anyone else observed this behavior in Xcode 26? Is there any known issue, workaround, or configuration change required to get the correct coverage report?

Environment:

Xcode 26

iOS 18 SDK

Unit tests running under XCTest

Any insights or suggestions would be appreciated.

We are encountering the same issue since Xcode 16. We run XCTest and Swift Testing.

For us it is flaky, sometimes some local Packages (SPM) are missing in the .xcresult file, resulting in a Coverage of 0% for these packages

Code Coverage Not Accurate in Xcode 26
 
 
Q