0

Using Android studio to run coverage test, I got this result:

enter image description here

For some of the class, there are tests run through all possible code path in the class, but still the result does not show 100% in either the "Method, %" or "Line, %".

How to read the coverage test result?

And it has this color code:

enter image description here

What do the different colors mean?

EricSchaefer
  • 25,272
  • 21
  • 67
  • 103
lannyf
  • 9,865
  • 12
  • 70
  • 152

1 Answers1

1

The Colors show you if a line was executed or not:

  • green: this line was executed during the test run
  • yellow: this line was executed, but there might be conditions that were not triggered (i.e. if (a && b()) and a was false, b() was not called)
  • red: this line was not executed
EricSchaefer
  • 25,272
  • 21
  • 67
  • 103