Configure the Tosca CI Client

This topic describes a legacy feature that Tricentis plans to discontinue in the near future. For detailed information on the deprecation plan and time line, see this Tricentis Knowledge Base article.

To find out about alternatives, check out this topic.

This chapter explains how to configure the behavior of the Tosca Continuous Integration Client (Tosca CI Client) if you want to launch Tosca Distributed Execution from Windows operating systems.

If you want to launch from non-Windows operating systems, see chapter "Configure the Tosca CI Client for non-Windows operating systems".

Workflow

To configure the Tosca CI Client, follow these steps:

  1. If you use Tosca Server with an HTTPS binding, prepare for the Tosca CI Client configuration.

    To do so, create an API access token in Tricentis User Administration. You need the token's client ID and client secret to authenticate the Tosca CI Client.

  2. Perform mandatory configurations:

    • Define the endpoint of the Tosca Distribution Server.

    • If you use Tosca Server with an HTTPS binding, set up the Tosca CI Client for communication via HTTPS and authenticate it.

    • If you use Distributed Execution with AOS, make the necessary AOS configurations.

  3. Perform optional configurations that define the behavior of the Tosca CI Client. For instance, change timeout settings or the polling interval.

Mandatory configurations for the Tosca CI Client

To run your tests, the Tosca CI Client needs a few mandatory configurations:

  • The endpoint of the Tosca Distribution Server (DEX Server).

  • HTTPS configuration and authentication if you use Tosca Server with an HTTPS binding.

  • Information on the AOS workspace if you use Distributed Execution with AOS.

To perform these configurations, follow these steps:

  1. Open the file ToscaCIClient.exe.config. After a default installation, this file is located at %COMMANDER_HOME%\ToscaCI\Client.

  2. Define the address of the DEX Server:

    • Go to the endpoint setting in the system.serviceModel section.

    • In the address attribute, define the endpoint:

      http(s)://<Tosca Server Gateway IP address or host name>:<Gateway port>/DistributionServerService/ManagerService.svc

<system.serviceModel>
    [...]
    <client>
        [...]
        <endpoint address="https://192.168.0.1:443/DistributionServerService/ManagerService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IManagerService"
                contract="ManagerService.IManagerService" name="BasicHttpBinding_IManagerService" />
    </client>
  1. If you use Tosca Server with an HTTPS binding, configure the Tosca CI Client for HTTPS:

    • Stay in the system.serviceModel section.

    • In the element whose binding name is "BasicHttpBinding_IManagerService", change the value of security mode to Transport.

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IRemoteExecutionService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="Infinite" sendTimeout="Infinite" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="None" />
        </binding>
        <binding name="BasicHttpBinding_IManagerService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="Infinite" sendTimeout="Infinite" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Transport" />
        </binding>
      </basicHttpBinding>
    </bindings>
    [...]
  </system.serviceModel>
  1. If you use Tosca Server with an HTTPS binding, you also need to authenticate the Tosca CI Client:

    • Go to the TOSCAContinuousIntegration.TOSCACIClient.Properties.Settings section.

    • In the DiscoveryServiceEndpoint setting, enter the authentication endpoint:

      http(s)://<Tosca Server Gateway IP address or host name>:<Gateway port>

    • In the ClientId setting, enter the client ID of your Tricentis User Administration API access token.

    • In the ClientSecret setting, enter the client secret of the token.

<setting name="DiscoveryServiceEndpoint" serializeAs="String">
    <value>https://111.111.111.0:443</value>
</setting>
<setting name="ClientId" serializeAs="String">
    <value>MyClientId12345</value>
</setting>
<setting name="ClientSecret" serializeAs="String">
    <value>1a2B3c4D5e_6F</value>
</setting>
  1. If you use Distributed Execution with AOS, set up the Tosca CI Client for AOS:

<setting name="WorkspaceRootName" serializeAs="String">
    <value>DEX_Work</value>
</setting>
  1. Choose one of the following options:

    • Perform additional, optional configurations.

    • Save and close the file.

Optional configurations for the Tosca CI Client

You can perform additional configurations that define the behavior of the Tosca CI Client. For instance, change the timeout settings or the polling interval.

To set optional configurations, follow these steps:

  1. Open the file ToscaCIClient.exe.config. After a default installation, this file is located at %COMMANDER_HOME%\ToscaCI\Client.

  2. Modify the following settings:

Setting name

Description

TimestampFormat

Defines the format of the time stamp in the execution result.

The default value of this setting is yyMMdd HHmm.

You can modify this setting with custom strings. For information on possible syntax, see https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings.

PathToResultFile

Defines the path to the result.xml file on the Tosca CI Client. The build server imports this file to display the test results.

You can overwrite this setting with the call parameter -r if you do not want to use the specified path for the execution of a particular test.

ConsiderExecutionResult

If your build server requires exit codes that indicate whether tests were successful or not, set the value of this setting to True. The exit code informs the build server whether the tests have passed or failed, or whether there are no results for one or more ExecutionEntries:

  • Passed: exit code 0

  • Failed: exit code -1

  • No result for ExecutionEntries: exit code -2. This code applies if ReportIntermediateResults is set to True.

The default value WorkspaceRootNameis False.

ResultType

Defines the structure of test results.

If ReportIntermediateResults is True, only result type Junit is possible.

The default value is junit.

CiClientTimeout

Time in milliseconds the Tosca CI Client waits for a response from the Tosca Distribution Server.

If the Tosca CI Client does not receive a response from the Tosca Distribution Server within this time frame, it leaves the TestEvent in the queue until you cancel it in the Tosca Distributed Execution Monitor.

The time interval defined in the CiClientTimeout must be higher than that of the PollingInterval. If it's not, the system automatically uses the time interval defined in the PollingInterval.

The default value is 36000000.

ReportIntermediateResults

If you want to receive results after the execution of each ExecutionEntry in addition to the summary results at the end of the test run, set the value of this setting to True.

The default value is False.

PollingInterval

The interval in milliseconds in which the Tosca CI Client requests a result from the Tosca Distribution Server.

The default value is 60000.

AOServiceRequestTimeout

Time in milliseconds that the Tosca CI Client waits for a response from the AOS. This configuration is optional and only applicable if you use Distributed Execution with AOS.

The Tosca CI Client tries to start the execution by sending the list of TestEvents to the AOS. If it does not receive a response from the AOS within this time frame, it starts polling the Tosca Distribution Server for execution results. If the Tosca Distribution Server has not received information from the AOS about this execution, the poll fails and the Tosca CI Client exits. If this error occurs, you can try increasing the timeout period.

The default value is 300000.

  1. Save and close the file.

Example: Set new values for CiClientTimeout and PollingInterval

In the example below, you increased the values for CiClientTimeout and PollingInterval:

<userSettings>
    [...]
    <TOSCAContinuousIntegration.TOSCACIClient.Properties.Settings>
        [...]
        <setting name="CiClientTimeout" serializeAs="String">
            <value>40000000</value>
        </setting>
        [...]
        <setting name="PollingInterval" serializeAs="String">
            <value>350000</value>
        </setting>
    </TOSCAContinuousIntegration.TOSCACIClient.Properties.Settings>
</userSettings>