My teammates have deployed a code to production without getting the class getting covered. and now I have added a small functionality and trying to push the code but deployment is failing is class handler are covering 0%. I'm wondering how did other teammates move the code to production without getting it covered

  • 2
    What you describe is impossible. It's much more likely that you simply haven't included the test class in your deployment/changeset or you've misspelled a test class name (if you're using Run Specified Tests instead of Run Local Tests). As per usual, you'll need to edit your question to include more details.
    – Derek F
    Commented Jun 21, 2022 at 13:44
  • @DerekF I guess its possible that only the test class could have been deleted via destructive deployment? I guess this is possible(Disclaimer: I've personally not tried this in a production org), although it would bring down the overall code coverage and pose problem to further deployments. I know it doesn't sound logical for someone to just delete test class alone this way, but rookie mistake could lead to this.
    – arut
    Commented Jun 21, 2022 at 17:42

2 Answers 2


What I've discovered is that when a production ORG is in "Trial" mode, you can actually build classes directly in the ORG just like a dev environment. Once provisioned then you have to spin up sandboxes for any custom development work. That could be how those classes got there to begin with with no test coverage.

You will probably have to write the test classes now as part of your current task in order to push your new code.

  • Sure, thanks a lot for the reply. as u have advised i will create a test classes. Commented Jun 23, 2022 at 17:35

While deploying, you can choose Run Local Tests, that will run all tests in the organization and count 75% of code coverage for all code in organization and not for specific classes / triggers.


  • Thanks and that might be the reason .How the class got there. Commented Jun 23, 2022 at 17:37

You must log in to answer this question.

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