You need to sign in to do that
Don't have an account?
Neal Lightfeldt
Apex Test Failures Code Coverage 40%
I am getting these Apex Test Failures when validating an inbound change set in production. None of these have to do with the app I am moving from Sandbox. I have zero knowledge of Apex and I just want to know what I have to do to resolve these errors. Can anyone help?
When Salesforce validates a change set , by default, it runs all custom Test code. Whilst the change you are trying to validate may have nothing to do with that particular code, all test classes in production will run and they would indicate an issue with your code.
In your Sandbox, assuming it is in sync with your production environment, run all the test code and see what errors occur. This would indicate whether there is a need to update the code that is currently erroring.
Alternate, and i'm loathe to point this out, but you can deploy a changeset and have it run only selected Test Classes.
Depending on the App you are trying to deploy/validate, if you know the test classes related purely to the Apex code you are deploying, you can select those test classes.
I am very, very wary of using this method to deploy, as I believe, it leads to poor overall system test coverage, remembering that test coverage is more than just lines covered, it should be testing that the expected outcome of your custom code does exactly as expected.
The errors you are seeing could be due to the changes that you are deploying without realising their impact on other parts of your SF environment.
Regards
Andrew