Test coverage - highlighting issue

14 views
Skip to first unread message

William Grymuza

unread,
Mar 17, 2025, 11:47:10 AMMar 17
to Illuminated Cloud General Discussion

Hi All. 

 

I'm not sure what I'm doing wrong and would like some help with the problem.

 

I have a complex change heading my way and I'm in position where I need to create brand new test classes for existing code - change has broke them and since the change involves new callouts and new mock methods, I decided to get new classes in place. 

 

I started with brand new test class. 

I created single test method inside this class. 

When I run this test with coverage, I can see the output which shows me the classes and covered with the number of lines covered in each class. This bit works absolutely fine. 

 

However, when I open one of the classes which have 05 (ZERO percent) coverage in that test, IDE still shows me this class as covered in 100% with the lines highlighted with green (attached). 

 

So, the editor shows that class has coverage, but coverage module tells me it has none. 

 

Tried so far: 

  • restarting of the IDE
  • Invalidating all caches and restarting
  • Invalidating all caches again, restarting, regenerating completely offline table
  • Removing previous test results (Right click --> Illuminated Cloud --> Manage coverage reports --> deleting all entries, clicking on no coverage).

 

Still, the class shows green bars. 

The only test run is from the new test class. 

New test class doesn't provide any coverage for the handler class, but IDE shows coverage.

 

If someone has any ideas, please let me know, I'm turning grey with this already...
Screenshot 2025-03-17 144236.png

Scott Wells

unread,
Mar 17, 2025, 12:06:23 PMMar 17
to Illuminated Cloud General Discussion, william...@circet.co.uk
Hi. IC just loads the coverage data from the org and displays it, so perhaps the org coverage data is stale? You might try resetting it from the Developer Console. Unfortunately there's not a public API for IC to do so itself. Open Developer Console using Illuminated Cloud | Developer Console, use Test | Clear Test Data to reset the org's coverage metrics, and run tests again with coverage to see the new coverage data.

If that doesn't show the correct information, please enable debug logging for Apex Code Coverage, reproduce the issue, and email the resulting idea.log file to me for review. Please be sure to specify exactly which classes/lines are displayed incorrectly so I can correlate that information to what I see in the debug log.

Also please be aware that responses today may lag -- or even push into tomorrow -- as it's both my kids' spring break and my wife's birthday. I will respond to any follow-up as soon as I can.

Regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages