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.