Scale unattended execution

The Tosca Remote Desktop Protocol (RDP) Server consumes substantial amounts of memory because it manages the UI sessions of the agents connected to the Tosca Distribution Server. For this reason, you may run into memory limitations when you need the Tosca RDP Server to handle a high number of RDP connections.

There are two ways to ease this memory load:

These methods are optional. You only need to use them if the machine running the Tosca RDP Server fails due to memory limitations.

Limit the maximum number of RDP connections of a Tosca RDP Server

By default, a Tosca RDP Server is allowed to open any number of RDP connections. Since RDP connections consume substantial amounts of memory, this can be a huge burden on the Tosca RDP Server machine. To ease this memory load, you can limit the number of RDP connections that a Tosca RDP Server is allowed to handle.

Setting a lower maximum number of RDP connections makes the execution more stable but also slower. As a general rule, you can safely set the maximum number of RDP connections to 50.

To specify the maximum number of RDP connections of a Tosca RDP Server, follow the steps below:

  1. Open the Web.config file located in the Tosca Distribution Server folder, by default C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer.

  2. Navigate to the applicationSettings section.

  3. Set a positive integer value for RdpConnectionLimit. By default, this is empty which means that there is no limit on the number of RDP connections to a Tosca RDP Server.

The maximum number of RDP connections that you specify here applies to every Tosca RDP Server.

Example: set a maximum number of RDP connections of 70

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

<value>70</value>

</setting>

Whenever you modify the Web.config file, you have to restart the Tricentis Tosca Server via the IIS Manager.

Do not modify the Web.config file while tests are running. If you do, all currently running and queued tests will be lost, and you will have to start them again after the Tricentis Tosca Server restarts.

Set up additional Tosca RDP Servers

You can set up one or more Tosca RDP Servers in addition to the Tosca RDP Server that runs on the Tosca Distribution Server machine. A machine running a Tosca RDP Server must always be running, and should run a permanent user interface session.

A Tosca RDP Server and a Tosca Distribution Agent must not run on the same machine.

To set up additional Tosca RDP Servers, follow the steps below.

  1. Copy the Tosca RDP Server folder to each machine which you want to use as an additional Tosca RDP Server.

    The folder is called DEXRdpServer and by default located at C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXRdpServer.

  2. On each machine running a Tosca RDP Server, modify the ToscaRdpServer.exe.config file located in the Tosca RDP Server folder. To do so, open the file with a text editor.

  3. Navigate to the system.serviceModel->client->endpoint section. Modify the value of the address attribute so that it refers to the IP address and the port of the Tosca Distribution Server.

  4. On each machine running a Tosca RDP Server, right-click the file ToscaRdpServer.exe and select Run as administrator from the context menu.

  5. Open the Web.config file in the Tosca Distribution Server folder with a text editor.
    This file is located in the DEXServer folder, by default C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer.

  6. Navigate to the system.serviceModel section, and modify the content within the client tags. Paste the following line once for every additional Tosca RDP Server.

    <endpoint address="http://%address%/RdpSlaveService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRdpSlaveService%number%" contract="RdpSlaveServiceReference.IRdpSlaveService" name="BasicHttpBinding_IRdpSlaveService%number%"></endpoint>

  7. Within each of these newly created endpoint tags, replace the parts within percentage signs % with the following.

    • %address%: IP address and port of the Tosca RDP Server.

    • %number%: a different integer value in each line. Start with 1, and increase the value by 1 in each successive line.

  8. Navigate to the bindings section, and modify the content within the basicHttpBinding tags. Paste the following line once for every additional Tosca RDP Server.

    <binding name="BasicHttpBinding_IRdpSlaveService%number%"></binding>

  9. Within each of these newly created binding tags, replace %number% with an integer value. Start with 1, and increase the value by 1 in each successive line.

  10. Limit the number of RDP connections that a Tosca RDP Server is allowed to handle.

Example: modify endpoint tag for an additional Tosca RDP Server (ToscaRdpServer.exe.config)

The highlighted part shows where you need to change the existing code.

<client>

<endpoint address="http://192.168.0.1:8080/DistributionServerService/RdpMasterService.svc"

binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRdpMasterService"

contract="RdpMasterService.IRdpMasterService" name="BasicHttpBinding_IRdpMasterService" />

</client>

Example: create endpoint tags for three additional Tosca RDP Servers (Web.config)

The highlighted parts show where you need to change the pasted code.

<system.serviceModel>

<client>

<endpoint address="http://localhost:9000/RdpSlaveService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRdpSlaveService" contract="RdpSlaveServiceReference.IRdpSlaveService" name="BasicHttpBinding_IRdpSlaveService"></endpoint>

<endpoint address="http://192.168.0.2:9000/RdpSlaveService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRdpSlaveService1" contract="RdpSlaveServiceReference.IRdpSlaveService" name="BasicHttpBinding_IRdpSlaveService1"></endpoint>

<endpoint address="http://192.168.0.3:9000/RdpSlaveService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRdpSlaveService2" contract="RdpSlaveServiceReference.IRdpSlaveService" name="BasicHttpBinding_IRdpSlaveService2"></endpoint>

<endpoint address="http://192.168.0.4:9000/RdpSlaveService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRdpSlaveService3" contract="RdpSlaveServiceReference.IRdpSlaveService" name="BasicHttpBinding_IRdpSlaveService3"></endpoint>

<endpoint name="executionService" binding="basicHttpBinding" contract="ExecutionServiceReference.IExecutionService" bindingConfiguration="ManagerServiceBinding"></endpoint>

</client>

Example: create binding tags for three additional Tosca RDP Servers (Web.config)

The highlighted parts show where you need to change the pasted code.

<bindings>

<basicHttpBinding>

<binding name="ManagerServiceBinding" sendTimeout="Infinite" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">

<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"></readerQuotas>

<security mode="None"></security>

</binding>

<binding name="BasicHttpBinding_IRdpSlaveService"></binding>

<binding name="BasicHttpBinding_IRdpSlaveService1"></binding>

<binding name="BasicHttpBinding_IRdpSlaveService2"></binding>

<binding name="BasicHttpBinding_IRdpSlaveService3"></binding>

</basicHttpBinding>

Whenever you modify the Web.config file, you have to restart the Tricentis Tosca Server via the IIS Manager.

Do not modify the Web.config file while tests are running. If you do, all currently running and queued tests will be lost, and you will have to start them again after the Tricentis Tosca Server restarts.