function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
msnellermsneller 

Apex code coverage reporting incorrectly

When deploying some updates to exiting apex classes, the deploy is failing because it says 0% code coverage. When I check coverage in the developer console it shows 83% coverage. Not sure what is going on. This just starting happening this week, I deployed a few changes last week without issue. Nothing has been changed or packages added in the meantime. I've had this issue in the past, but usally went away after 24 hours. Any ideas? Is this a bug?
Best Answer chosen by msneller
SabrentSabrent
Did you try running your test class after making the changes to the existing apex class, that you are trying to deploy? 
It may be that you have made the changes to the controller however the test class is not reflecting this change and as a result failing, giving you 0% code coverage. 

All Answers

SabrentSabrent
Did you try running your test class after making the changes to the existing apex class, that you are trying to deploy? 
It may be that you have made the changes to the controller however the test class is not reflecting this change and as a result failing, giving you 0% code coverage. 
This was selected as the best answer
msnellermsneller
Thanks for the reply Rov. You're correct, I added a parameter. I guess I expected a different error on deployment. Anyway, I'm updating the test now and I'll try a redeploy.