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
Jaymin Sutarwala 7Jaymin Sutarwala 7 

Deploy modified test class

Hi all,
We added couple of validation rules on the Quote object which broke a couple of our test classes. I fixed those test classes and am now trying to deploy those classes into production through changesets. The issue I am facing is when i perform the validation salesforce picks the test classes that exists in production instead of the modified test classes in my changeset. How can I deploy my modified test classes into production?
Mahesh DMahesh D
Hi Jaymin,

Generally it shouldn't happen, try selecting the selective Test Classes to run as part of the deployment.

If nothing works out then work around is, disable the Validation Rules in production, deploy your changes and enable the Validation Rules.
But this is not suggestable as a regular basis, only if you are in time crunch and not able to find the root cause then go with this route.

Please let me know if this helps.

Regards,
Mahesh