How to view code coverage details in Intellij
Solution 1
Aha! It show up in the Explorer. Now there really should also be a text report .. so if anyone knows where that is or how to generate it another answer would be appreciated.
NOte: I can not show the full path names for confidentiality reasons
Solution 2
From the Intellij documentation. To generate a code coverage report
- Do one of the following:
- On the main menu, choose Analyze | Generate Coverage Report.
- In the toolbar of the Coverage tool window, click
exportToTextFile
.
- In the Generate Coverage Report dialog box that opens, specify the target directory where the generated report will be stored, and optionally select the check box Open generated HTML in browser.
- Click Save. IntelliJ IDEA will store the generated report to the specified location, and also open it in the default browser, if the corresponding check box has been selected.

WestCoastProjects
R/python/javascript recently and before that Scala/Spark. Machine learning and data pipelines apps.
Updated on June 05, 2022Comments
-
WestCoastProjects 6 months
When I run Code Coverage -either as part of invoking a unit test or from
Analyze | Generate Coverage Report
the result is only a one-line summary as shown:Instead what we want is to see coverage by class - to hone in on the undertested areas. Even better would be detailing per-class areas (to the lines?) Does IJ have any of those capabilities?
-
WestCoastProjects about 6 yearsHuh.. that directory does not exist. Any suggestions why that might be?
-
davidrpugh about 6 yearsOk. I sometimes run tests from the command line and that directory may have been generated by sbt. I came across this link that might be of use jetbrains.com/help/idea/2016.2/…
-
davidrpugh about 6 yearsApologies. What about this one? jetbrains.com/help/idea/2016.2/…
-
Bas Leijdekkers about 6 yearsThere is a Generate Coverage Report button (box with green arrow pointing up) in the tool bar next to that table. Also if you double click on one of the classes there the coverage should be displayed in the editor that opens (geen/red bars in the gutter).