Xcode 9.2. I have enabled test coverage, written some tests and run them.
On the right side of the editor, Xcode shows if a code has been tested or not by displaying red or green rectangles.
However, I don't know what is the meaning of a rectangle with stripes.
I have not managed to find an answer in Xcode guides or help files.
Screenshot:
The striped rectangles indicate partial code coverage. Somebody just asked this question elsewhere and in looking at some test cases, I realized that if you hover your mouse over a line with the stripes, you get something like this:
As you'll notice, part of the line is green and part of it is red. The green part is for the condition which comes under code coverage since that part was executed. The red part is for the error message which was not executed since the test passed. Hope that makes sense?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With