Line Code Coverage
Code coverage can have 2 meanings.
-
MEANGING 1 = ( in IntelliJĀ IDEA) Line Code Coverage allows you to see the extent to which your code has been executed. Another way to think of this is Code USE
MEANGING 2 = Testing Code Coverage isĀ a metric that helps you understand how much of your source is tested.
Line Code Coverage - MEANING 1 - CODE USE -
as per IntelliJ instructions you can choose to Run with Code Coverage. The results are shown below where running the code it if the class method's are being utilized.
In the example below the AddressEntry class is not used. As can be seen on the right the color red next to each method indicates (through color settings) that the Cove use is low (or 0%)
_.
By contrasti in the IntelliJ code coverage tool Green is the color for high coverage (under color settings for code- line coverage) for the Menu class. As can be seen in the following screenshot, and the subsequent code only the Menu class is used in our main method of this very simple program.
|
Go to IntelliJ to learn how to control colors for line coverage (File->Setting, select Editor->Color Scheme , then General and under Line Coverage you can change the color for Full (100%, partial and uncovered)