Send data via Tricentis Notification Service

Tricentis Notification Service is the data interface between Tricentis Tosca and other applications. It is a vital component if you integrate Tricentis Tosca with qTest, SAP Solution Manager, or Tosca Dashboards.

Setup process

To set up Tricentis Notification Service for your integrations, perform the actions below. Subsequent chapters describe each step in detail.

  1. Prepare the Tricentis Notification Service database.

  2. Install and configure Tricentis Notification Service.

  3. Optionally, perform additional configurations for the data transfer between the Tosca client, Tricentis Notification Service, and consuming applications.

  4. Enable Tricentis Notification Service for your project.

Once the setup is complete, Tricentis Notification Service automatically sends data to your integrations whenever you checkin your project.

Tricentis Notification Service logs all messages it sends.

Prepare the database

Tricentis Notification Service sends data when you checkin. It collects all data, stores it in a database, and then sends it. After sending the data, Tricentis Notification Service deletes the sent data from the database.

This database is not part of the Tricentis Tosca or Tosca Server installation. You need to prepare and host it on your end. The database you prepare must meet the following requirements:

  • It's an MS SQL database. Make sure the machine where you host it meets the MS SQL system requirements.

  • The database user is db_owner.

  • The user has CREATE, ALTER, SELECT, INSERT, UPDATE, and DELETE rights.

  • The size of the database is sufficient for your project. The database is a buffer between Tosca and the consuming application. Notification Service deletes the data after successfully sending it on, so the database won't grow over time. It just has to be big enough to handle the data during the transfer.

You don't need to create database tables. Tricentis Notification Service creates them when it starts for the first time.

Install and configure Tricentis Notification Service

Tricentis Notification Service is a Tricentis Tosca Server feature.

Its setup is part of the Tricentis Tosca Server installation and configuration:

Perform additional configurations

You can fine-tune the behavior of the data transfer between the Tosca client, Tricentis Notification Service, and consuming applications. For instance, you can modify the number of retries, batch sizes, or the sending strategy.

Additional configurations: Tosca client to Notification Service

You can define how many common repository objects Tosca loads, how many it sends per HTTP request, and how long a HTTP request is allowed to take. To do so, follow these steps:

  1. Create a write-access copy of the TCShell.exe.config file as described here.

  2. Modify the settings described here.

  3. Save and close the file.

Additional configurations: Notification Service to consumer

You can define how many times Tricentis Notification Service should try to send data to the consumer, the batch size, and the sending strategy. To do so, follow these steps:

  1. Open the appsettings.json file. After a default installation, the file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\NotificationService.

  2. In the NotificationHub section, modify the following settings:

Setting

Description

MaxRetries

By default, Tricentis Notification Service tries to send data five times. If the transmission fails at every try, for instance due to timeouts, Notification Service deletes this data from the database and cancels.

Enter a positive integer to define a different number of retries.

Note: the higher the number, the longer the checkin process will take if Notification Service can't send the data.

BatchSize

This setting only applies to the Tosca Dashboards integration.

By default, Tricentis Notification Service sends Tosca Dashboards data in batches. Each batch contains a maximum of 150,000 objects. If this causes memory issues for Notification Service, you can specify a lower number of objects per batch.

SendingStrategy

This setting applies if you integrate Tricentis Tosca with more than one application.

The default value is Parallel. This means that Tricentis Notification Service transfers the data to multiple applications in parallel, which is the fastest way to send data. The transmissions start at the same time and run in separate threads.

To take full advantage of this transmission type, your machine needs multiple kernels that can handle multiple threads. If your machine doesn't have multiple kernels, you can define a different transmission type:

  • Enter the value Async. In this case, transmissions start at the same time, but the machine's operating system distributes memory between the transmission tasks. Even though Notification Service doesn't send data to multiple applications fully in parallel, asynchronous transmission can still speed up the process.

  • Enter the value Sequential. In this case, Notification Service sends data sequentially. It sends all data to one application; once this transmission is complete, Notification Service sends data to the next application.

  1. Save and close the file.

  2. If Tricentis Notification Service was already running when you modified the appsettings.json file, restart the service.

Enable Tricentis Notification Service

To enable Tricentis Notification Service, follow these steps:

  1. Open the Tosca Administration Console.

  2. In the Projects Overview, go to the project for which you want to enable Tricentis Notification Service and click on the Edit icon.

  3. This opens the Project details dialog. In the Notification Service section, select the Enabled checkbox.

  4. Click Yes to confirm.

  5. Click Save.

ProjectA has Tricentis Notification Serviceenabled

To disable Tricentis Notification Service for a project, click on the project'sEdit icon and clear the Enabled checkbox in the Notification Service section.

Check logs

Tricentis Notification Service logs all messages it sends. If you run into issues with your data transfers, check the logs to see what Tricentis Notification Service sent when.

To do so, access the machine that holds Tosca Server and go to C:\ProgramData\TRICENTIS\Logs\NotificationService.

By default, Notification Service creates one log file per day and retains a maximum of seven log files. To change this behavior, follow these steps:

  1. On the machine that holds Tosca Server, go to C:\Program Files (x86)\TRICENTIS\Tosca Server\NotificationService.

  2. Open the appsettings.json file.

  3. Go to the Serilog section.

  4. Enter a new value for retainedFileCountLimit. You can enter any positive integer to indicate the number of log files you want Tricentis Notification Service to keep.

  5. Save and close the file.