I am getting issue with code coverage percentage. In my dev org it is showing 84% but when I am trying to create package then it is showing 74% and I am not able to create package. I have cleaned up my dev org. It has only code which are require to make package(No Extra code).

So I like to know what is the reason for this mismatch. Does this is general issue or I am doing something wrong. Please guide me…

1 Answer 1


Coincidentally I was facing the exact same issue this morning. Eventually, I found out that the percentage your dev org shows does not count classes/triggers etc that are never hit by any tests. Please run all tests and verify that all your classes are listed with a percentage. Any classes that aren't listed are probably pulling down your code coverage when trying to create a package. Make sure that you write tests for these classes.

  • Thanks for your reply. I verified, all classes are covered in my Dev org. Seems there are some other issue... Feb 3, 2015 at 12:27
  • Have you reset your test data in Setup > Develop > Apex Test Execution > Test History? Feb 3, 2015 at 13:00
  • Thanks, I have also tried this but did not get luck. Feb 5, 2015 at 6:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .