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, please see page 17 (Deploying Code)http://www.salesforce.com/us/developer/docs/daas/salesforce_migration_guide.pdf
Go thorugh below link:
https://developer.salesforce.com/page/An_Introduction_to_Apex_Code_Test_Methods
Thanks,
Pratik
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, please see page 17 (Deploying Code)http://www.salesforce.com/us/developer/docs/daas/salesforce_migration_guide.pdf
Please let me know if this helps
Best Regards
Naga Kiran