Configure the Tosca RDP Server

You can set the following configurations for the Tosca RDP Server:

Specify the timeout to open the RDP connection

The RDP connection is started by the Tosca Distribution Agent. The Tosca Distribution Agent tries to open a connection to the Tosca RDP Server for a set amount of time. If it cannot establish a connection within that time frame, it aborts. If needed, you can increase that time frame.

To do so, follow the steps below:

  1. Open the ToscaDistributionAgent.exe.config file located in the Tosca Distribution Agent folder, by default C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\DistributedExecution.

  2. Navigate to the userSettings section.

  3. Set a different value for the parameter EstablishRdpConnectionTimeoutMilliseconds. It defines the time frame in milliseconds within which the Tosca Distribution Agent tries to establish a connection. The default value is 30000.

<userSettings>

[...]

<setting name="EstablishRdpConnectionTimeoutMilliseconds" serializeAs="String">

<value>30000</value>

</setting>

[...]

</userSettings>

Specify the attempts to re-establish the RDP connection

By default, the Tosca RDP Server does not try to re-establish the connection to the Tosca Distribution Agent after the connection is lost.

This means that, by default, if you log in to a Tosca Distribution Agent on which unattended execution is running, the execution stops and cannot be resumed.

To configure the Tosca RDP Server to try to re-establish the RDP connection after it is lost, follow the steps below:

  1. Open the ToscaRdpServer.exe.config file located in the Tosca RDP Server folder, by default C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\DistributedExecution\Rdp.

  2. Navigate to the applicationSettings section.

  3. Set a different value for the following parameters:

    • MaxConnectionRetries defines the maximum number of times the Tosca RDP Server tries to re-establish the connection.

      The default value is 0.

    • WaitBetweenRetriesMilliseconds defines the time interval in milliseconds between the attempts to re-establish the connection.

      The default value is 15000.

<applicationSettings>

<Tricentis.RdpServer.Properties.Settings>

[...]

<setting name="MaxConnectionRetries" serializeAs="String">

<value>0</value>

</setting>

<setting name="WaitBetweenRetriesMilliseconds" serializeAs="String">

<value>15000</value>

</setting>

[...]

</Tricentis.RdpServer.Properties.Settings>

</applicationSettings>

If the value of MaxConnectionRetries is higher than 0 and you log in to a Tosca Distribution Agent on which unattended execution is running, you will get logged out shortly afterwards. This happens because the Tosca RDP Server tries to reconnect and logs out any active users if it loses the connection to the Tosca Distribution Agent.

Specify a custom port for the RDP connection

The RDP connection needs a port open for outbound communication on the Tosca Distribution Agent. Port 3389 is the default port for Remote Desktop on Windows. If this port is not available on the agent machine, you need to specify a custom port for the RDP connection.

To do so, follow the steps below:

  1. Open the ToscaRdpServer.exe.config file located in the Tosca RDP Server folder, by default C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\DistributedExecution\Rdp.

  2. Navigate to the applicationSettings section.

  3. Set a different value for the parameter RdpListeningPort. It defines the port used for the RDP connection. The default value is 3389.

<applicationSettings>

<Tricentis.RdpServer.Properties.Settings>

[...]

<setting name="RdpListeningPort" serializeAs="String">

<value>3389</value>

</setting>

[...]

</Tricentis.RdpServer.Properties.Settings>

</applicationSettings>