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
Dorothy DaviesDorothy Davies 

Error Message in APEX Components

Ok so this is my first deploy from Full sandbox to Production and I received no error messages on the components, but i received the following 2 APEX test failures

ChangeLeadOwnerController_ExtTest testChangeOwner System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, City is Required: [City]
Stack Trace: Class.ChangeLeadOwnerController_ExtTest.testChangeOwner: line 9, column 1

ChangeLeadOwnerController_ExtTest testLeadIdGetterSetter System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, City is Required: [City]
Stack Trace: Class.ChangeLeadOwnerController_ExtTest.testLeadIdGetterSetter: line 42, column 1

I have NO idea what this is or what this means becuse I did NOTHING on the Lead or pulled anything into the Change set from the lead.  Help!
Best Answer chosen by Dorothy Davies
logontokartiklogontokartik
Yeah, when you push changesets, your org runs all the test classes no matter how many components you push. And the reason why your CS is failing is some of your tests are failing (probably because someone might have added validation rules after test were built).

You or your developer need to fix the tests before you can deploy anything.

PS: you should see the same error when you indivdually run the above tests.

All Answers

logontokartiklogontokartik
Yeah, when you push changesets, your org runs all the test classes no matter how many components you push. And the reason why your CS is failing is some of your tests are failing (probably because someone might have added validation rules after test were built).

You or your developer need to fix the tests before you can deploy anything.

PS: you should see the same error when you indivdually run the above tests.
This was selected as the best answer
Dorothy DaviesDorothy Davies
Thank you very much!!