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
alok29novalok29nov 

Test coverage

 

Hi,

 

I have written a class in sandbox and a test class for thye same. It has test coverage of 91%. When I move it to prodcution, Its coveareg gets reduced and shows only 68%. It is happening beacuase of salesforce shows comment lines and curly breckets as uncovered code which should not be the case.

 

Can anybody suggest why is this happening and what is the solution Or is it a bug?

 

Thanks,

Alokk

Andy BoettcherAndy Boettcher

When that happens - I do the "Compile All Classes" and then "Run All Tests" - that usually clears it up.

 

-Andy