Scenario: Production org has sufficient code coverage with unit-tests. Someone adds validation rule(s) which cause the tests to break. Minimum 75% code coverage is no longer there. We come along to add new code (were not involved in the orginal code). When we go to deploy our code which itself has sufficient coverage the deployment fails due to the newly added validation rules breaking the tests on the legacy code.
Options here are
- Review all the legacy code written by a third party and update it and its tests so it handles the newly added validation rules - not really viable in some cases, neither the client nor ourselves want that expense.
- Manually disable the validation rules which are breaking the legacy code unit-tests for the duration of the deployment - not ideal, but the route I've been forced to take on occasion.