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
Ben MeyersBen Meyers 

Code coverage

Since last week our code coverage has decreased by 10%.  The only changes we made were a couple classes no longer are referenced anywhere in our org.  Is this a new Salesforce setting?  I cannot understand what has happened.
Best Answer chosen by Ben Meyers
Ben MeyersBen Meyers
I simply recreate two of our larger unit test classes and it worked.  Cod coverage went back to 85%.

All Answers

AmWeAmWe
we are also experiencing the sae issue
Steve_EarlySteve_Early
Did you happen to activate the new feature for de-duping in Spring '15 under Data.com? I just had a situation where I did turn this feature on, and my code coverage went from 90% to 29% !!  I may not have had the matching rules in the de-duping program set right, but I couldn't deploy anything. I had to de-activate this feature to deploy a change set.
Ben MeyersBen Meyers
No new features were activated.  We use multiple installed packages but I dont' believe that is the issue either.  What I have noticed is that our getter/setter (mutator methods) are not be marked as covered by our tests.  Last week they were covered.  Something must have changed in the way Salesforce calculates code coverage. 
AmWeAmWe
I also found out what asdgsd asdgsd mentioned yesterday. Getters and setters are not marked covered when the class is instantiated as earlier. We have to write test code to access them also. That’s the reason for code coverage drop
Steve_EarlySteve_Early
All very strange - I deactivated the Data.com stuff. Ran the coverage tests, everything went back to 90%. I then reactivated the Data.com de-duper stuff and ran the coverage tests again and my coverage stayed at 90%. I am seeing the same issue with the getter/setter stuff not passing. 
Ben MeyersBen Meyers
I simply recreate two of our larger unit test classes and it worked.  Cod coverage went back to 85%.
This was selected as the best answer