1

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

Problem:
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.

Example:
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

2 Answers 2

1

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.

0

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.

You must log in to answer this question.

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