Code coverage creating Framework

Hi everyone,


I'm having a doubt or an issue creating a simple CocoaTouch Framwork and measuring the code coverage.


For "test only" purposes I just created one struct and one unit testing file. Before testing, in the scheme's Test phase I've already checked the "Gather Coverage Data" checkbox. All tests succeed but the code coverage for the Framework still 0% within the Report Navigator > Coverage tab. I just can get some coverage checking the "Show Test Bundles" option.


Am I missing something? Do I have to include some code that uses the Framework to check the coverage?

Yes, your tests need to call into the framework to get any coverage results for the framework.

But they do. Tests are actually using the framework.

I've just created a new toy Framework and made some screenshots... Is there any way to send them to you?

Ok. I think I've resolved the problem.


Within "Target Membership" I've just remove the tick for the KitTest target for all my Kit files.


Then I've just include the @testable sentence on every test file and "voilà"!!


Coverage's ready!!


Thanks you so much to: http://natashatherobot.com/swift-2-xcode-7-unit-testing-access/

Code coverage creating Framework
 
 
Q