function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brooks Johnson 6Brooks Johnson 6 

Get rid of test classes on a deleted object.

I am trying to comment out a couple old triggers that my Org does not use anymore. They are commented out in the Sandbox and set to inactive. I have also commented out the test classes and the trigger handlers in the sandbox. 

But I am not able to deploy because one the triggers and two of the test classes are on an object that no longer exists. I am getting a  failure because my code coverage is only 63%  The tests that are failing are the ones that I want to turn off along with their trigger. How can I deal with this?
Rahul Jain 169Rahul Jain 169
 You will have to delete the Object and its respective trigger and helper Class using ant's preDestructive.xml file. 

Hope it answers.
Brooks Johnson 6Brooks Johnson 6
I was wrong. The original objects were not deleted. They are still there. But never used. The test classes on them are failing. As an admin that is just starting to learn to code in Apex how can I fix this? I have tried to deploy the triggers and the handlers as commented out from the Sandbox but I can't because my code coverage is to low. The XML destructive file looks like it might be beyond my abilities.