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
Riju Jain 27Riju Jain 27 

handling errors when deploying changesets

I am trying to deploy my first changeset from sandbox to production. I made few changes to visual force pages in my sandbox now I am trying to mock the deployment (to production) in Sandbox. when I validate it is giving my 100's of errors which are due to some packages that we use . Code does not have 75% coverage . How to handle this? Any help is appreciated
pconpcon
Unfortunately I don't think there is much that can be done with using changesets without getting the packages to update themselves to reach the code coverage.  Are all of the errors you are getting because of the percentage of code coverage? What type of packages (managed / unmanaged) are the errors on?

With a little bit of manual work, you could deploy to production via ANT (aka Force.com Migration Tool) [1] using the Quick Deploy functionality [2].  Unfortunately the Quick Deploy isn't a trivial thing to do and does require some manual work.

[1] https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_deploying_ant.htm
[2] http://releasenotes.docs.salesforce.com/en-us/spring15/release-notes/rn_quick_deployment_ga.htm
Riju Jain 27Riju Jain 27
Thank You for your response . So I successfully validated the deployemnt using "run only local test". I did it in Sandbox. ie. I moved changest from one sandbox to another. Will I be able to do it same way for production without breaking anything :)
pconpcon
Using "run only local test" should do what you want.  That's a relatively new function that I always forget about.
daniel_hdaniel_h
When you deploy to prod, fmanaged package tests won't run and won't block your deployment. You can make your deployments even faster by running only specific selected tests, but use that with care because you might miss a test class that should have been run. I use the specific tests option when deploying a hot fix that needs to get in really fast.
Yaswanth KothapalliYaswanth Kothapalli
When you are deploying from Sandbox to Sandbox Run All tests will not occur and no need of Code Coverage, but when you are trying to deploy to Production, the Code Coverage matters.