Configure the Tosca CI Client for test execution via Remote Service

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

For information on how to configure the behavior for the launch from non-Windows operating systems, see chapter "Configure the Tosca CI Client for Remote test execution for non-Windows operating systems".

Configure the Tosca CI Client

To configure the Tosca CI Client, you need to modify the ToscaCIClient.exe.config file. This file is located at %COMMANDER_HOME%\ToscaCI\Client.

The ToscaCIClient.exe.config file must be located in the same directory as the ToscaCIClient.exe file.

Modify the following settings:

Setting name

Description

Optional

endpoint address

Defines the endpoint of the Remote Execution Service.

Enter the same endpoint address that you have specified in the system.serviceModel section of the ToscaCIRemoteExecutionService.exe.config file.

Replace the host name with the IP address of the machine that hosts the Remote Execution Service.

 

WebserviceAuthenticationUsername

Authorizes the Tosca CI Client for the execution of tests. If you have configured the Remote Execution Service for client authentication, this setting is mandatory.

Enter the same value that you have specified in the ToscaCIRemoteExecutionService.exe.config file.

 

WebserviceAuthenticationPassword

Password for the AuthenticationUsername. If you have configured the Remote Execution Service for client authentication, this setting is mandatory.

Enter the same value that you have specified in the ToscaCIRemoteExecutionService.exe.config file.

 

TimestampFormat

Defines the format of the timestamp in the execution result. The default value is yyMMdd HHmm.

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

X

ReportIntermediateResults

Specifies that you want to receive results after the execution of each ExecutionEntry in addition to the summary results at the end of the test run.

By default, this setting is turned off, i.e. set to False.

X

PollingInterval

This setting only applies if ReportIntermediateResults is set to True.

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

X

CiClientTimeout

This setting only applies if ReportIntermediateResults is set to True.

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 aborts the execution and removes the request from the queue.

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

The default value is 36000000.

X

ResultType

Defines the structure of test results.

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

X

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.

X

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.

X

Example 1: Define the endpoint of the Remote Execution Service

In the example below, you have modified the endpoint address of the Remote Execution Service in the system.serviceModel section:

<system.serviceModel>
    [...]
    <client>
        <endpoint address="http://100.100.100.100:8732/TOSCARemoteExecutionService"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRemoteExecutionService"
                contract="ServiceReference1.IRemoteExecutionService" name="BasicHttpBinding_IRemoteExecutionService" />
        [...]
    </client>

Example 2: Define the behavior of the Tosca CI Client

The example below defines the behavior of the Tosca CI Client in the following way:

  • The Tosca CI Client saves the result file to the path C:\Sample_Directory\Result.xml.

  • The build server expects an exit code from the Tosca CI Client.

<userSettings>
    [...]
    <TOSCAContinuousIntegration.TOSCACIClient.Properties.Settings>
        [...]
        <setting name="PathToResultFile" serializeAs="String">
            <value>"C:\Sample_Directory\Result.xml"</value>
        </setting>
        <setting name="ConsiderExecutionResult" serializeAs="String">
            <value>True</value>
        </setting>
        [...]
    </TOSCAContinuousIntegration.TOSCACIClient.Properties.Settings>
</userSettings>