is there a simple way to schedule the run of all test classes? I want to avoid having to do this manually every day.

Thank you!


Here is a cookbook code from developer.force.com that does just that


  • Thank you! I will follow this and see if I can implement it. I was hoping there's something that won't require custom coding :-( – user9862 Aug 6 '14 at 13:19

A not so simple way but a good approach if you are using a version control system...

You can go a step further than running your tests once a day by having your tests run every time someone commits a change. See e.g. Setting Up Jenkins for Force.com Continuous Integration. (This also verifies that what you have in your version control system is deployable i.e. pieces are not missing.)

Jenkins listens for changes from your version control system, then when anything changes deploys your code and runs all the tests. On a busy project where many changes are made a day, this allows failures to be identified and addressed more quickly than the following day.

  • we haven't implemented version control yet. I need an interim solution until version control process is in place. – user9862 Aug 6 '14 at 13:20
  • @user9862 Understood - just wanted to paint the picture of what the overall setup could look like in the future. – Keith C Aug 6 '14 at 13:22

If you are willing to install the Force.com Migration tool and install Jenkins, you can find instructions here for running all of your test classes every night: https://securityzen.net/continuous-integration


Here's yet another way to do this, with a Visualforce "control panel" that makes setup and monitoring a snap: Force Code's Scheduled Apex Unit Tests

enter image description here

  • Steve, how do I install this automation? – vlr Mar 14 '18 at 20:23
  • I added everything to my org, but I can not find this section above when you could schedule the time and specify unit test prefix. I have only these tabs: "Automated Test Setup" and "Automated Test Runs." Automated Test Setup has only fixed times for TestRunner and for TestRunnerResults. – vlr Mar 20 '18 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.