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
AK-2AK-2 

Deploying to development org

I have a development org where I trying out a few deployment scripts with Ant. However, when I deploy to the dev org, the unit tests are not run automatically. 

In the dev org, if I run unit tests when I deploy using the "runAllTests" flag to true, the deployment fails because of code coverage. However, if I set runAllTests to false, the deployment works since the unit tests don't run.
However, my question is - shouldn't the unit tests always run when I deploy to the org since it's a prod org (even though it's a dev org)? Will I be able to set runAllTests to false in prod org to bypass unit tests?
 
Best Answer chosen by AK-2
James LoghryJames Loghry
To answer your first question, even though you use login.salesforce.com to log into a developer org, it plays by a slighy different set of rules.  No you don't need 75% code coverage to deploy there, no it doesn't run unit tests automatically when you deploy code there.  Think of how often you edit code on a developer org.  It would run unit tests frequently.

And when you deploy to production, it will run your code's unit tests, even if runAllTests=false.  If you set runAllTests=true, then it will not only run your own unit tests, but any installed package's unit tests as well.