Search code examples
xcodeunit-testingcode-coverage

Test Code Coverage: What do the numbers mean?


What do these test counts represent?

I look at the 4 & 5 and don't understand their differences when looking at the code:

enter image description here

versus... enter image description here

Are they a count of something?


Solution

  • The numbers represent the number of times the function was called when running the unit tests. In your first example the numberOfRowsInSection function was called 4 times when running the unit tests. In your second example the cellForRowAt function was called 5 times during the unit tests.