[SalesForce] is there a possibility for Run all tests (in target sandbox) before deployment

is there a possibility for Run all tests (in target sandbox) before deployment from my dev sandbox?
If so how to do that?

I have about 700 components in my changeset and its successfully validated. But I read in SF help that run all test have to be done manually.

If that is the case after I deploy and say run all tests, and if it fails, is a possiblity to roll back?

(or)

Can I do a run all tests after validating my changeset somehow? (i know its foolishness to ask this question because it might not have the components to run all tests. just wanted to know if there is tweak somehow? 🙂 )

Best Answer

You can force a run of all tests when deploying using the Force.com migration tool which is a wrapper over Ant. Set runAllTests=true when deploying to simulate a production like deployment where all tests are run while deploying. To rollback if test classes fail, set the rollBackOnError deployment option to true.

Here is the reference documentation, look around page 17 (Deploying Code) http://www.salesforce.com/us/developer/docs/daas/salesforce_migration_guide.pdf