Apex tests when deploying change sets
Key Takeaway
When you deploy a change set that includes Apex classes or triggers to a production org, all local Apex tests in that org run by default. Deploying a change set to a sandbox doesn't run tests automatically.
When you deploy a change set, Salesforce may run Apex tests in the target org to check that the code still works. Whether tests run depends on the type of target org and on what the change set contains. A production org also requires a minimum level of code coverage. You can validate a change set ahead of time to see whether its deployment would succeed, without deploying anything.
Which Apex tests run when you deploy a change set
If you deploy a change set to a production org and the change set includes any Apex classes or triggers...
All local Apex tests in the production org run by default. Tests that come from installed managed packages don't run by default.
If you deploy a change set to a production org and the change set has no Apex classes or triggers...
No tests run by default, because the default test rule depends on Apex, not on every component type. For example, a change set that contains only custom fields runs no tests by default when you deploy it to production.
If you deploy a change set to a sandbox...
The deployment doesn't run Apex tests automatically.
Salesforce recommends running all local Apex tests in a development environment, such as a sandbox, before you deploy to a production org. Doing this reduces the number of tests the production deployment needs to run.