Different ways to schedule tests from Quality Center

I had to research a lot to do this hope this helps others doing something similar.

Scenario:  To schedule tests from Quality Center:
Solutions: There can be different ways that we achieve this based on what our motive is while scheduling the tests.

Solution 1: Schedule test sets directly from Quality Center

1.       Login to Quality Center
2.       Navigate to the Test Lab Module
3.       Choose the test set that you want to schedule and click on the Execution Flow Tab
4.       Right-click on the test that requires configuration of Time Scheduler and click Test Run Schedule
5.       In the Run Schedule window, select the Time Dependency tab. The time and date of execution can be configured from this tab as shown below:
6.       Once the above step is complete, you can see the time dependency added to the relevant test cases
7.       Once Run All is clicked from the Automatic Runner dialog, the test status will change to Waiting  and QC will fire the tests to be run at the scheduled date and time.

To be used when: Can be used to run tests for nightly runs (usually after work hours).
Challenges: This is a good solution if scheduling is a onetime activity and not a repetitive process.

Solution 2: To schedule tests from Quality Center “RunTestSet” utility.

Using the OTA(Open Test Architecture) API and the Windows scheduler  to schedule tests:
1.       Save a copy of the “RunTestSet” utility on the machine you want to run the tests from.
2.       Go to the Windows Scheduler and press on Add Scheduled Task item.
3.       The task wizard window is displayed
4.       Click on Browse button to select the path where the “RunTestSet” utility is saved
5.       Define task name and specify periodic range: daily or weekly
6.       Fill NT user authentication information.
7.       Select “Open advanced properties...” checkbox and press Finish button.
8.       At the Run edit box, fill in RunTestSet parameters: server, project, user, password, testset and optionally the host or the host group.
E.g. : "C:\RunTestSetScheduler\RunTestSet.exe" /s:http://QCURL/qcbin /n:Domain/d:Project/u:user/p:Password /f:Folder structure of QC /l /m:mail id
9.       Create a batch file to make this activity a one click process.

To be used when: Can be used to run tests for repeatedly using the combination of the windows scheduler and the “Runtestset” utility
Challenges: This is a good solution if the machines are not locked and are in active state.

Solution 3: To schedule tests from Quality Center “RunTestSet” utility and a unlocking utility.

1.       Use a utility like the “Logon utility” 
2.       Create a Script file that will run this software on the intended machines.
The contents of the Script file will be something like this :  c:\users\Logon <-u user> -p password
3.       From the Local machine run this script, which will first unlock the system.
4.       Then use the “Runtestset” utility just like before and the tests are scheduled successfully.

What is achieved  by this:

·         Able to schedule tests from any machine
·         Can run tests either on the local machine or different remote machines
·         Can be used to either schedule the tasks for a single instance or multiple instances.
·         Can run tests irrespective of the machine being in a locked state or not.
·         Can send a mail to intended users once the execution is complete.

Challenges: The only challenge here is that the machine needs to have correct credentials and should not be in a logged off or shutdown mode.


  1. Mahesh26/11/10

    Thnx aditya was searchin fr this...

  2. Thanks for this amazing post. The ways that you have shared are very helpful and will help a lot to improve the quality.

  3. Thnx Mahesh... I am happy it helped.

  4. Anonymous4/4/12

    Thanks Aditya..It was really helpful.

  5. Hi,

    Technology Specific Guide for QTP is a new book that has got great feedback from all the readers. It will get you started on the path of automation, introducing solutions, roadblocks, patches and ideas that will give you a solid foundation in the field of automation. Everyone from a novice user to an automation expert will have something they would have never heard of or used.


    Best Regards,

  6. Anonymous18/2/13

    These steps are somehow too tedious when there are many test sets within which there are many test instances to be run. Isn't there a more faster way?

  7. @Anonymous Nothing that I have found or explored yet.

  8. Anonymous11/2/14

    Very good Aditya.. Liked ur blog..!!

  9. Jagdish Anand11/2/14

    Is it possible to run scripts in different remote machines at the same time using QC OTA architecture??

  10. @Jagadish - Yes its very much possible to do that, depends on what approach you want to take:

    Pre-requisite - Remote machine needs QTP/any automation tool installed and some settings to allow HP products to execute tests remotely.

    1. QTP/Selenium on your slave system, store libraries in ALM that can be downloaded onto the slave. Now connect QTP to ALM and make one of your machines as the master slave for the others
    You can provide the IP address/ machine name in the test lab and that will serve your purpose

    2. Use AOM
    Set qtApp = CreateObject("QuickTest.Application", "Remote Machine Name")

    3. You could try using WMI to execute some VBScript on the remote machine which starts QTP. Refer http://www.softwaretestingwiki.com/doku.php?id=testing_tools:launching_quick_test_pro_remotely

  11. Anonymous27/7/15

    Hi Aditya,

    Please post the code for runtestset utlity or vbscript for executing the test on a hostgroup.

    1. Anonymous27/7/15

      Also please post any vbscript for logging into the remote machines by giving username and password.

  12. Anonymous25/6/16

    This post was really helpful. Thank you so much! Had a question. Is there any way possible to run automated tests without selecting "Run All"? If we forgot to select Run All, that means the test won't run for that time period. Please help. Thanks

    1. Thanks, To be honest it's been a while I have stopped working on QC/ALM. I would not be a good person to answer this unless I have seen the latest version.



Post a Comment

Popular posts from this blog

XPATH for IE / internet explorer

Website's underlying technology for automation

All time good software testing books!