XCTest UI tests do not include coverage information for embedded frameworks.
- In Xcode 8.2.1 coverage is reported for the target app.
- In Xcode 8.3 beta 3 coverage is not reported for the target app.
In neither version is coverage reported for embedded frameworks used by the target app. However, coverage is reported for the embedded frameworks used by the XCTRunner process, i.e our test code.
In the below screenshot, you can see that UsedByTest is covered, and UsedByApp is not. UsedByTest is called from CoverageTestUITests.testCoverage, whereas
UsedByApp is called from ViewController.
My expectation is that coverage for UsedByApp is reported instead of UsedByTest, since the coverage of framework code used by tests is far less useful than the framework code used by the app.
- Run
bundle install - Run
bundle exec pod install - Open the xcworkspace and run the tests
- Observe in the XCTRunner console: "!!!! UsedByTest.perform was called"
- Observe the app console: ""!!!! UsedByApp.perform was called"
- Observe that coverage is not reported for code in the
Sharedframework that is called from the app target
