Optional Tosca Distribution Server configurations

You can configure the behavior of the Tosca Distribution (DEX) Server.

Do not do this while tests are running. If you do, all currently running and queued tests are lost.

In this case, you have to restart Tosca Server and trigger them again.

General server configurations

The following configurations are available for Tosca Distributed Execution with Automation Object Service (AOS) and Tosca Distributed Execution without AOS:

Server configurations for Tosca Distributed Execution with AOS

The following configurations are only available for Tosca Distributed Execution with AOS:

You can also set up Tosca Distributed Execution with AOS to work with multiple repositories. For more information, see chapter "Distributed Execution with AOS with multiple repositories".

Change synchronization interval

The synchronization interval determines how often a Tosca Distribution Agent asks the Tosca Distribution (DEX) Server for ExecutionLists to run.

By default, DEX Server and Agent synchronize once per minute.

With lower synchronization intervals, Agents spend less time in Idle mode, but there is more network traffic.

To change the synchronization interval, follow the steps below:

  1. Open the Tricentis.DistributionServerService.exe.config file. By default, this file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer.

  2. Go to the applicationSettings section.

  3. Set a different value for AgentSynchronisationInterval.

  4. If you want to modify other general configurations you can do so now.

  5. If you are done with your configurations, perform the following actions:

    • Save and close the file.

    • Restart the service Tricentis.DistributedExecutionService in the Windows Task Manager.

Example: a synchronization interval of 1 minute, 30 seconds:

<applicationSettings>
    <DistributionServer.Properties.Settings>
        ...
        <setting name="AgentSynchronisationInterval" serializeAs="String">
            <value>00:01:30</value>
        </setting>
    </DistributionServer.Properties.Settings>
</applicationSettings>

Whitelist domains

If you whitelist domains, the DEX Server only accepts Agents or Tosca CIClients from these domains.

Once an Agent or CIClient contacts the DEX Server, the server checks whether the domain of the user who started the Agent or CIClient matches the domain(s) on the list.

To whitelist domains, follow the steps below:

  1. Open the Tricentis.DistributionServerService.exe.config file. By default, this file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer.

  2. Go to the applicationSettings section.

  3. Set the value for UseAgentLdapAuthorization to True.

  4. Enter your user domains as a value for AgentLdapValidDomains.

    • You can enter multiple domains, separated by semicolons.

    • You can also use wildcards, for instance tricentis.* or tri*.com.

    If you set the value for UseAgentLdapAuthorization to True, but don't enter any domains, users receive an error when they try to execute their TestCases.

  5. If you want to modify other general configurations you can do so now.

  6. If you are done with your configurations, perform the following actions:

    • Save and close the file.

    • Restart the service Tricentis.DistributedExecutionService in the Windows Task Manager.

Example: two whitelisted domains

<applicationSettings>
    <DistributionServer.Properties.Settings>
        ...
        <setting name="UseAgentLdapAuthorization" serializeAs="String">
            <value>True</value>
        </setting>
        <setting name="AgentLdapValidDomains" serializeAs="String">
            <value>tricentis.com;google.*</value>
        </setting>
    </DistributionServer.Properties.Settings>
</applicationSettings>

Change the log file path

The file ToscaDistributionServer.log logs all activities of the DEX Server, for instance when an Agent registers with the server or when TestEvents are distributed.

By default, the system saves the file to C:\ProgramData\TRICENTIS\ToscaServer\DistributionServer\logs.

If you have write access to this directory, you can specify an alternate path.

To specify an alternate path, follow the steps below:

  1. Open the Tricentis.DistributionServerService.exe.config file. By default, this file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer.

  2. Go to the log4net section.

  3. Enter a different path in the value for LogFileAppender.

  4. If you want to modify other general configurations you can do so now.

  5. If you are done with your configurations, perform the following actions:

    • Save and close the file.

    • Restart the service Tricentis.DistributedExecutionService in the Windows Task Manager.

Example: custom path to the log file

<log4net>
    [...]
    <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
        <param name="File" value="C:\ProgramData\CustomPath"></param>
        <param name="AppendToFile" value="true"></param>
        <rollingStyle value="Size"></rollingStyle>
        <maxSizeRollBackups value="10"></maxSizeRollBackups>
        <maximumFileSize value="10MB"></maximumFileSize>
        <staticLogFileName value="true"></staticLogFileName>
        <layout type="log4net.Layout.PatternLayout">
            <param name="ConversionPattern" value="%date [%thread] %-5level %logger - %message%newline"></param>
        </layout>
    </appender>
</log4net>

Configure workspace retry interval

This option is only available for Tosca Distributed Execution with AOS.

After you execute a TestEvent in Tosca Commander, the Automation Object Service (AOS) accesses the workspace. If that fails, it tries again after 90000 milliseconds (90 seconds).

To configure a different time interval, follow the steps below:

  1. In Windows Task Manager, check if the service Tricentis.ToscaAutomationObjectService is running. If it is, stop it.

    This might take a little time. You can double-check the Processes tab in Windows Task Manager to make sure that it doesn't list Tricentis.ToscaAutomationObjectService.TcApiExecutor.exe.

  2. Open the file Tricentis.ToscaAutomationObjectService.TcApiExecutor.exe.config. By default, the file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\AutomationObjectService.

  3. Go to the applicationSettings section.

  4. Enter a new value in milliseconds for WaitTimeInMsForOpenWsRetry.

  5. If you want to modify other AOS configurations you can do so now.

  6. If you are done with your configurations, perform the following actions:

    • Save and close the file.

    • Restart Tricentis.ToscaAutomationObjectService in the Windows Task Manager.

Example: retry interval is 10000 ms

<Tricentis.TcApiExecutor.Properties.Settings>
    <setting name="WaitTimeInMsForOpenWsRetry" serializeAs="String">
        <value>10000</value>
    </setting>
    [...]
</Tricentis.TcApiExecutor.Properties.Settings>

Configure results folder checkout

This option is only available for Tosca Distributed Execution with AOS.

To save test results, the Automation Object Service (AOS) needs to check out the test results folder. If another service has already checked out the folder, the AOS cannot check it out.

By default, the AOS repeatedly tries to check out the folder for 600000 milliseconds (10 minutes).

To configure a different time period, follow the steps below:

  1. In Windows Task Manager, check if the service Tricentis.ToscaAutomationObjectService is running. If it is, stop it.

    This might take a little time. You can double-check the Processes tab in Windows Task Manager to make sure that it doesn't list Tricentis.ToscaAutomationObjectService.TcApiExecutor.exe.

  2. Open the file Tricentis.ToscaAutomationObjectService.TcApiExecutor.exe.config. By default, the file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\AutomationObjectService.

  3. Go to the applicationSettings section.

  4. Enter a new value in milliseconds for MaxWaitForCheckout.

    If the AOS cannot check out the test results folder within this timeout period, or it cannot connect to the workspace within the connection retry interval that you specified, it saves the test results to the hard drive.

    When the AOS restarts, it tries to save the test results to the common repository again. The timeout period for this retry attempt is the same that you set in the MaxWaitForCheckout setting.

  5. If you want to modify other AOS configurations you can do so now.

  6. If you are done with your configurations, perform the following actions:

    • Save and close the file.

    • Restart Tricentis.ToscaAutomationObjectService in the Windows Task Manager.

Example: timeout period is 1000000 ms

<Tricentis.TcApiExecutor.Properties.Settings>
    [...]
    <setting name="MaxWaitForCheckout" serializeAs="String">
        <value>1000000</value>
    </setting>
</Tricentis.TcApiExecutor.Properties.Settings>

Set a custom DEX Server port

By default, DEX Server runs on port 5007. To use a different port, follow the steps below:

  1. Open the Tricentis.DistributionServerService.exe.config file. By default, this file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer.

  2. Replace the port number in each of the four baseAddresses with the desired port number.

Choose a new DEX Server port number

  1. Save and close the file.

  2. If you have an HTTPS binding, configure the HTTPS certificate to use the new port. To do so, run the following command with administrator privileges:

    cd C:\Program Files (x86)\TRICENTIS\Tosca Server\DEXServer\

    _SetHttpsCertificate.cmd <certificate thumbprint> <desired port>

    Replace the fields <certificate thumbprint> and <desired port> with their respective values.

  3. Restart the service Tricentis.DistributedExecutionService in the Windows Task Manager.

  4. Open the appConfig.json file. By default, this file is located at C:\Program Files (x86)\Tricentis\Tosca Server\DexAdmin\Frontend\assets.

  5. Replace the baseUrl port number with the desired port number.

  6. Save and close the file.

  7. Restart the service Tricentis.DistributedExecutionMonitor in the Windows Task Manager.

  8. Configure the Agents to use the new port. This process differs according to the setup type:

  9. Configure Tricentis Tosca to use the new port. To do so, go to Project->Settings->Commander->Distributed Execution->Server and update the EndpointAddress setting accordingly.

  10. If you use Automation Object Service, update the Distribution Server Address with the new port number in the Automation Object Service tab of the Tricentis Service Configuration.