[SalesForce] Salesforce Change set validation fails

I have six Apex classes [No triggers] that I am trying to deploy. The code coverage for each class is different: 68%, 73%, 75%, 89%, 89%, and 72%.

So theoretically the average should be over 77% code coverage.

But when I validate the Inbound Change set it tells me that Average test coverage across all Apex Classes and Triggers is 22%, at least 75% test coverage is required.

Can someone explain to me how that is possible?

Best Answer

The code coverage is calculated across all classes and triggers in the target org, not just what is in your change set. There must have been a change in your org that is causing the poor coverage. Hard to say exactly what it is, though. Try running all tests in the sandbox and see what the org code coverage is.