background story:
We slipped under the 75% test coverage. In addition to writing new tests I deleted some old classes (no longer needed ones).

Deleting classes which are still referenced in test classes has caused a deadlock.

  • The Apex tests won't succeed due to the missing classes.
  • Deploying the missing classes again isn't possible due to an automatic (not successful) execution of the unit tests.

public class AlreadyDeletedClass { }
@isTest private class AlreadyDeletedClass_Test { static testMethod void notWorkingTestMethod() { NotLongerNeeded canNotBeInstantiated = new NotLongerNeeded(); } }

Any suggestions how to proceed?

Thank you in advance.

Warm Regards, Florian


You won't be able to deploy components partially. The only solution is:

Make sure you have more than 75% coverage. Deploy all components which are failing which included main classes and their test class along with all dependencies.

In brief, you will need to replace all failing components and its dependent components for successful deployment. Include test classes as well.


You can try deploying the older deleted classes along with the Test classes. Or just deleted all those test classes and redeploy the test classes along with previously deleted classes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.