I made some small tweaks to an apex class in sandbox and all my unit tests passed in sandbox, I tried pushing the apex classes and the unit tests.

The error I'm getting is Fatal Error and that my code has no coverage. In sandbox, my code is north of 90%. The developer console doesn't give me any logs of the apex deployment so I can't debug there.

What am I missing?

enter image description here

enter image description here

UPDATE: The unit tests that cover this code are already live in production. When I validation the change set I run all of them

  • SalesForecastCreateBatch_Test
  • SalesForecastUpdateBatch_Test
  • SalesForecastCreate_Controller_Test
  • SalesForecastSchedulerTest

As you can see below the code coverage for both classes in sandbox are >= 90%.

enter image description here

enter image description here

  • 2
    Odds are, you forgot to push the test class with the class.
    – sfdcfox
    Apr 27, 2018 at 15:57
  • 2
    Please edit your question to more clearly indicate what test settings you used during your deployment. Are you deploying the classes indicated? Are they new?
    – Adrian Larson
    Apr 27, 2018 at 16:14
  • 1
    No apologies needed, down vote removed. Do the tests pass in your validation? In the live environment?
    – Adrian Larson
    Apr 27, 2018 at 17:12
  • 3
    I found the issue, I forgot to include commas between the test classes. Rookie mistake. Thanks for the support Apr 27, 2018 at 17:34
  • 2
    @kmomo If you could add that as an answer (again remember to be very detailed), that would add a lot of value to the community. Please also don't forget to accept that answer.
    – Adrian Larson
    Apr 30, 2018 at 14:22

1 Answer 1


Following may be the reasons:

  1. You have two classes mentioned in the error does not have 75% code coverage in the org(production)
  2. You have not included the test classes in the deployment that you are currently doing and hence the system is looking for the 75% code coverage for these classes in org which it calculates to be <75%
  • Thanks for the reply, I've updated my post to give more information about the unit tests. Apr 27, 2018 at 17:10
  • 1
    It can be xx% in sandbox , run the same test class in production and see whats the code coverage of the same , if you are inline with you sandbox before you deploy. Also if you want to avoid this issue , push these test classes along with your current deployment and specify these classes so that it will take the coverage from the current deployment
    – freaker87
    Apr 27, 2018 at 17:18
  • The issue was forgetting to include commas between the test classes, apologies for the jv move Apr 27, 2018 at 17:34

You must log in to answer this question.

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