Search code examples
androidunit-testingandroid-studiokotlintdd

Color Meanings in Android Studio Tests


There are some blue, green, orange, yellow, and red lines when running tests on an Android Studio.

What is the meaning of each color? They appear on both the Test class and the SUT.

I mean where the red dot exists

On The Left Side of Android Studio There are Blue and Green Colors

Left side of the image with different colors


Solution

  • There's actually two different types of lines in your screenshots.

    The ones close to the thin vertical continuous line is about local changes to the file. Green means "new lines", blue means changed lines and a little arrow pointing towards the code means removed lines.

    The colored lines further to the left are about code coverage. Green means that this line was executed (covered) and red means it was not executed.