You need to sign in to do that
Don't have an account?
Kazuki Kawamura
When transferring from production environment to sandbox, Code coverage error occurs as soon as APEX code is verified.
I want to deploy an Apex class from sandbox to production.
The apex class has 88% code coverage in sandbox.
Is the code coverage in sandbox different from that in production?
The apex class has 88% code coverage in sandbox.
Is the code coverage in sandbox different from that in production?
All Answers
Â
Following your advice, I checked.
The class I want to deploy (hereinafter, this is called âclassAâ) calls 2 classes.
First class (hereinafter, this is called âclassBâ) is ordinary class and does not call any APEX class.
Second class (hereinafter, this is called âclassCâ) is exception class defined by me and does not call any APEX class.
Class B and C is already deployed to production.
Class B has 100% (36/36) code coverage by class B test in sandbox.
Class C has no test classes because of exception class, so is not calculated.
Â
When class A test runs in sandbox, class A has 88% (134/152) code coverage, class B has 94% (34/36), class Câs code coverage is not displayed.
Â
All code coverage except Class C which is exception class are above 75%.
Â
Is it true that exception class has not to be tested?
Is anything I have to check?
By deploying Test classes, the code coverage problem is solved.
Thank you all.