You need to sign in to do that
Don't have an account?
tonante
A Couple Questions Regarding Apex Test Execute and Code Coverage
I have just run Apex Test Execution in my production org and I am seeing a coverage of 75%!
1) We have recnetly loaded a bunch of Managed packe files like Non-Profit Starter pack etc.) and some of those test cases failed during Apex Execution.
2) I found that we have old files that are at 0% in the org left by earlier consultants that I believe we don;t need anymore.
IN order to increase covrage should I:
1) Remove old unused classes with 0% coverage ? (Placed somehow by other consultants) Doesn;t that at least give and extra increase of 1% code coverage?
2) Compile the Managed packages before running the Apex Test Execution? (I never compiled them before running Apex Test Execution)
Thanks much for your help.
1) We have recnetly loaded a bunch of Managed packe files like Non-Profit Starter pack etc.) and some of those test cases failed during Apex Execution.
2) I found that we have old files that are at 0% in the org left by earlier consultants that I believe we don;t need anymore.
IN order to increase covrage should I:
1) Remove old unused classes with 0% coverage ? (Placed somehow by other consultants) Doesn;t that at least give and extra increase of 1% code coverage?
2) Compile the Managed packages before running the Apex Test Execution? (I never compiled them before running Apex Test Execution)
Thanks much for your help.
In order to improve your own code coverage beyond 75%, yes, I would take a look at files you could remove. You'll likely need to do this with destructiveChanges.xml (google it for more information). Since code coverage is calculated by lines covered / total lines, you're percentage will not necessarily increase by 1% of course, it may be less it may be more.
I'd also take a look at your other classes and determine ways you could improve code coverage across them. (For instance, you can sort the classes by file size, and look at the % of code covered.)
Good luck,
All Answers
In order to improve your own code coverage beyond 75%, yes, I would take a look at files you could remove. You'll likely need to do this with destructiveChanges.xml (google it for more information). Since code coverage is calculated by lines covered / total lines, you're percentage will not necessarily increase by 1% of course, it may be less it may be more.
I'd also take a look at your other classes and determine ways you could improve code coverage across them. (For instance, you can sort the classes by file size, and look at the % of code covered.)
Good luck,