+ Start a Discussion
Dane Kim 8Dane Kim 8 

Consequence of Deleting Test Classes in Production

Hey guys,

So, my org has some older test classes that seem to obstruct me from launching new code (sometimes I can go disable 14 different validation rules as a workaround). I'm able to delete classes via Eclipse IDE. I'm very tempted to delete the obstructing test classes, but I want to make sure I'm not going to be causing irreversival damage.

I know this would bring down the organizational code coverage. Also, if there are any conflict with future code, this might not be evident during development. Anything else that you know this would affect?

Thanks in advance for your help!
David ZhuDavid Zhu
From my experience, besides code coverage, you may have to have tests for each trigger. Otherwise, your next deployment will fail.
Design proper test cases/classes :)
More specifically, if your environment has changed to the point that your old test classes are not functioning, those test classes should be updated OR the code they are referencing should be removed.
Dane Kim 8Dane Kim 8
Thanks for the suggestions. I'm updating all the test classes to avoid the validation errors. The question now is the best stratgy for redeployment. My fear is that I'll fix all the code, but the deployment of the update will still fail... so, what is the best way to update/redeploy test classes?
Get them gathered into a single deploy; if what you 'fix' doesn't bring your total coverage above 75%, it will fail, so you want to get as many as you can in a deploy so it brings the total coverage up.