3

I use XCode 7.2 and Swift 2.0, no extra pods for testing, just XCTestCase class. I don't have @testable import myApp and adding it doesn't fix my problem.

I have everything set up correctly to see code coverage for my Swift project (I have set it up following this post - How to use code coverage in Xcode 7? ).

And it works, when I run all tests (with Command-U). However, when I try to run a particular test class (e.g. CuriousUITests: XCTestCase) or a specific test (e.g. testMyFavouriteButton), the coverage shows as if none of the code is covered!

Why does that happen?

I want to be able to see code coverage when running just one test, so that after implementing a new test, I don't have to run all of my tests to see if it indeed does cover what I expected (It just takes too long to run them all).

Thanks for all your help!

da-na

Community
  • 1
  • 1
da-na
  • 250
  • 2
  • 8

0 Answers0