Code Coverage Not Showing In Editor

I have turned on code coverage (before running my unit tests), and clicked on Editor > Show Code Coverage, but the editor does not show the code coverage information along the right side of the editor window. It has appeared intermittantly, but then it will disappear for seemingly no reason.


I am able to see code coverage information (the blue percentage bars for each class) in the "Coverage" tab of the reports navigator, but when I open any class in the editor, the coverage information does not appear along the right side of the window.


Any ideas?


Thank you!

It has appeared intermittantly, but then it will disappear for seemingly no reason.

Yeah, I’ve seen this before but never got around to investigating the reason, or indeed filing a bug about it (bad Quinn, no biscuit!). You should definitely file your own bug, with as much detail as you can muster.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I saw something like this recently (yesterday). I turned on Code Coverage then ran the app. The Code Coverage slider bars showed that ONE Swift file had 0% coverage. Since I just added a bunch of tests that tested that file, it was surprising, When I clicked the icon to go to the code in that file, it showed the Code Coverage column that showed how many times the line was called...ALL were called...yet the Code Coverage slider bar showed 0% on that file....

Today when I run it, now it shows 100% on slider bar and in the file. Go figure. Gremlins were running wild yesterday holding that slider bar at 0, today they are sleeping. Who knows? By the way I'm using Xcode 8.3.3. I tried using Xcode 9 a few days ago and got errors in this area, so I went back to something more stable.

Code Coverage Not Showing In Editor
 
 
Q