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
tdwarnketdwarnke 

Change set validation fails on errors from tests not in the change set

Attempting change set from sandbox to prod (using sf deploy process and eclipse). Validation of the change set takes extremely long time(15+minutes)  and fails with errors on test cases for classes that are not in the changes set. Created a change set with a  single static resource with no dependencies to test... it failed validation with 7 errors on classes completely unrelated and not included - as if it were validating all the change sets, not just mine. Eclipse finally worked on the static resource change, but not on other vf pages... keeps pulling up unrelated errors.

 

Any thoughts on "refreshing" the validation so it isn't checking other items not in the change set?

 

Terry

uptime_andrewuptime_andrew

I believe you will have to fix the errors first before you can deploy your changes.

tdwarnketdwarnke

That's reasonable, but it doesn't explain the way the tool is working. It should not be running validation on unrelated (i.e. not included in the change set) classes. I should be able to deploy a clean new class.

uptime_andrewuptime_andrew

I believe SFDC always runs all tests when anything is deployed, related or not.

 

I'd suggest posting an idea to the IdeaExchange, rather than here.

 

 

jyoti_tripathijyoti_tripathi

For deployment to a production organization, all the tests in your organization, except for those that originate from installed managed packages, are automatically run. If any of the tests fail, the entire deployment will roll back.

There is an exception to this rule if you are deploying components for one or more of the following metadata types:

  • ApexComponent
  • ApexPage
  • Dashboard
  • EmailTemplate
  • Report
  • Scontrol
  • StaticResource

If your deployment consists entirely of components for one or more of these metadata types, no tests are run. However, if the deployment includes components for any other metadata type, all the tests are automatically run.

For example, no tests are run for the following deployments:

  • One ApexComponent component
  • 100 Report components and 40 Dashboard components

All tests are automatically run for the following deployments:

  • One CustomField component
  • One ApexComponent component and one ApexClass component
  • Five CustomField components and one ApexPage component
  • 100 Report components, 40 Dashboard components, and one CustomField component

 

http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_deploy_running_tests.htm