Remote Scheduled Execution (Single Machine Setup)
With Test Studio you can schedule test lists on a single machine, but using the Test Studio services and simulating remote test list execution. The Scheduling service setup allows you to keep the generated results in a storage database.
The below article describes how to enable scheduling tests for a Standalone Test Studio installation on a single machine. You can also read this Step-By-Step series blog post about setting up Test Studio Scheduling.
- Installing Test Studio for Remote Scheduled Execution
- Configure the Test Studio Services
- Configure the Execution Client
- Setting Up a Project for Remote Scheduled Runs
- Schedule a Test List
- View Results of Remote Scheduled Run
Installing Test Studio for Remote Scheduled Execution
Install Test Studio product and ensure to include the Test Studio Scheduling Service and Storage Service components in the Customize Installation dialog.
Note
The Test Studio services can be also added by changing the already installed product.
Note
The Storage service uses MongoDB as a storage database. The Test Studio installation wizard automatically detects, if there is an existing installation of the third party tool and if not, it will be additionally installed.
Configure the Test Studio Services
Important
If the machine has active firewall, ensure that the following ports are opened in both the inbound and outbound directions:
- Scheduling Service: 8009
- Storage Service: 8492
- Execution Machine(s): 55555
Open Test Studio and under the Project tab in the Scheduling section, click Configure button in order to access the Test Studio Scheduling Config wizard.
Optionally, the Configure Scheduling wizard can be accessed through the Windows Start menu by typing Configure Test Studio Services.
Go through each tab to setup the Test Studio services:
- Communication Tab
- MongoDB Tab
- Storage Tab
- Scheduling Tab
- Setup Automatic Emails for Scheduled Jobs
- Executive Dashboard Tab
Communication Tab
The Communication Key is required by all Test Studio Scheduling components - services and clients, to establish the connection and communicate between each other. The Communication tab lets you manage the current key in use or generate and import a new one.
The Current Key section allows you to Copy to Clipboard the current key in use or Show its value (for the cases when copying is not an option).
The Replace Key section lets you Generate a new key. Once generated, the new value is populated in the text field and is ready to be imported. Hit the Import button to replace the current key with the new one.
Note
Importing a new key in the Scheduling Config wizard restarts the Scheduling service and Execution Server on that same machine to apply the new value.
If Test Studio application is also running on the same machine at the time of renewing the communication key, it is not automatically restarted. To apply the recent changes you need to restart the standalone Test Studio app manually.
See here step-by-step instructions on updating the communication key.
MongoDB Tab
The MongoDB tab contains the settings required for the MongoDB database. The MongoDB data path and mongod.exe path fields are populated with the values for a default MongoDB installation. Hit the Apply button and confirm the MongoDB is started status appears in the lower left corner of the wizard.
Note
The Scheduling config wizard uses the default MongoDB parameters to connect to it. Thus, you may need to change these, only if the MongoDB installation was modified.
Storage Tab
The Storage tab displays the Test Studio Storage service details - you can verify the MongoDB connection string, which is the default way to connect to the Mongo database. Hit the Apply button and check the Telerik Storage Service is started status appears in the lower left corner of the wizard.
Scheduling Tab
The Scheduling tab contains information about the location of the Test Studio Storage and Scheduling services. The default populated values are pointing to the local machine - localhost. For this particular configuration, these can remain unchanged and you can hit the Apply button. That will start the scheduling service and show you details about the storage service's status and database version in the Storage Service Location section. You will also see a message in the lower left corner of the wizard stating 'Telerik Scheduling Service is running'.
Automatic Email for Scheduled Test Lists
Optionally, you can configure the Test Studio Scheduling service to use an Email (SMTP) server by specifying few additional details. These settings allow you to send an automatic email with the results of a scheduled test list. Depending on the SMTP server configuration, mandatory fields are the 'SMTP server address' and the 'Port' to communicate with it and the 'User Email' and 'Password' are not explicitly required. Once these fields are populated, hit the Apply button to reflect the changes to the Scheduling service and check if the 'Telerik Scheduling Service is running' appears in the lower left corner of the wizard.
Note
If you are using an Outlook account with two-factor authentication enabled, you need to use an Application password created for the SMTP configuration. See the response in this Microsoft forum post for further details.
Executive Dashboard Tab
The Executive Dashboard tab contains information about the Storage service location used to get scheduled results from, and links the URL on which the Dashboard is hosted. The default populated values are pointing to the local machine - localhost. For this particular configuration, these can remain unchanged and you can hit the Apply button. This will start the Executive Dashboard service - you will see a in the lower left corner of the wizard stating 'Telerik Test Studio Executive Dashboard Service is running'.
Configure the Execution Client
Open the Test Studio Test Runner from the System Tray (it is started with Test Studio, or automatically on startup of the system, if the respective option is set).
Ensure the Scheduling URL points to the local machine - localhost will be resolved to the absolute name of the machine.
The communication Key is required to establish the connection and to enable the communication to the Scheduling server. A key is generated in the Scheduling Config wizard and if it's not matching on both the Scheduler and Execution machines, the connection between these is not possible.
Note
See here step-by-step instructions on updating the communication key.
Setting Up a Project for Remote Scheduled Runs
Open the Test Studio project, which contains the test list to schedule for unattended execution, and click the Connect button from the Scheduling
ribbon in the Project tab.
In the Scheduling Server Settings dialog, choose Remote radio button to connect the project to the configured Scheduling server.
Communication Key
The Communication Key lets you import the key generated in the Scheduling Config wizard. The text field remains empty to keep safe the value of the key in use. To indicate a key is in use ensure the Loaded status is present.
Tip
In case the communication key is not matching, you need to import the current key in use. Check here how to generate a new key and import it for all Scheduling components.
Server Name
Enter the Scheduling machine name or use localhost when the same machine is the Scheduling server, then click Connect.
A confirmation message appears when the connection is successful. Confirm the connection by pressing the Confirm button in the dialog.
Schedule a Test List
Schedule Test List execution in the Test Lists view. You will be able to choose between the connected Execution machines.
View Results of Remote Scheduled Run
View Scheduling Results after the scheduled test list run is finished.