This affects both IntelliJ 2019.3 and 2020.1 (latest as of this post) Ultimate Editions.
Code coverage is missing for some classes, while other classes continue to show coverage. Stating the obvious, but the classes that do not show coverage data in fact should show it because those lines are hit by the tests.
Error that is seen is:
[2020.04.23 23:52:20] (Coverage): Error during class instrumentation: com.<redacted>: java.lang.ArrayIndexOutOfBoundsException: 113 [2020.04.23 23:52:20] (Coverage): Error during class instrumentation: com.<redacted>: java.lang.ArrayIndexOutOfBoundsException: 144
Note that the redacted part is the actual fully qualified class path. The tests execute correctly, but the coverage data is missing.
I have ensured that the tests are set up for coverage correctly:
Does anybody know how to get past this so that the missing classes show coverage info?
To disable code coverage highlighting In the IDEA IDE, on the Analyze menu, click Show Code Coverage Data, or use the Ctrl+Alt+F6 keyboard shortcut. In the Code Coverage Suites dialog, choose No coverage.
Coverage in the Coverage tool window If you want to reopen the Coverage tool window, select Run | Show Code Coverage Data from the main menu, or press Ctrl+Alt+F6 . The report shows the percentage of the code that has been executed or covered by tests. You can see the coverage result for classes, methods, and lines.
This seems to be the bug that is reported is IDEA-269838.
It is currently marked as resolved / fixed without specifying the version in which it is fixed. I think that means that the fix will be in Intellij IDEA 2021.3 which is due this month (November 2021) according to the JetBrains website.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With