Apex tests on production change set deploy
Key Takeaway
If a change set deployed to a production org includes any Apex classes or triggers, all local tests run by default. One failing test rolls back the whole change set.
When you deploy a change set to a production org, Salesforce can run Apex tests first to check that the new code works and is covered by tests. The tests act as a gate for the deployment. The rules depend on which org you deploy to, because production and sandbox orgs treat tests and code coverage differently.
Which Apex tests run by default
If a change set deployed to a production org includes any Apex classes or triggers...
All local tests in that org run by default.
If the change set has no Apex components...
No tests run by default.
If the target org is a sandbox...
By default, the deployment doesn't require Apex tests or run them.
Salesforce recommends running all local tests in a development environment, such as a sandbox, before deploying to production.