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
SureshKolliSureshKolli 

Code Coverage problem

Hi
 
I have written a test code in the sandbox and gives me 100% code coverage??
but once i send it to production it gives me 0% code coverage?? Can any one helpout of this....
Best Answer chosen by Admin (Salesforce Developers) 
Dhaval PanchalDhaval Panchal
Did you have included your test class in your change set?

And when you deploy your code to production it will scan for all code in production for code coverage including your new components which you want to deploy. So there is a possibility that production is already running under below code coverage and you are trying to deploy your code to production.

All Answers

Dhaval PanchalDhaval Panchal
Did you have included your test class in your change set?

And when you deploy your code to production it will scan for all code in production for code coverage including your new components which you want to deploy. So there is a possibility that production is already running under below code coverage and you are trying to deploy your code to production.
This was selected as the best answer
SureshKolliSureshKolli

thanks for your  information let me verify and i ll get back to u....