Send data via Tricentis Notification Service

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

Use your own, self-hosted database

Tricentis Notification Service automatically sends data to your integrations when you check in. 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.

By default, Tosca Server delivers an SQLite database for this purpose.

If you want to use your own, self-hosted database instead, you can do so. Keep these things in mind:

  • Tricentis Notification Service supports MS SQL or SQLite databases.

  • The machine where you host the database must meet MS SQL or SQLite system requirements.

  • If you use an MS SQL database, the database user must be db_owner and have CREATE, ALTER, SELECT, INSERT, UPDATE, and DELETE rights.

  • If you use an SQLite database, the user account that runs the NotificationService Windows service must have access to the file path, as well as read and write rights. The SQLite database must be on the same machine as Tosca Server. It's possible to work around this requirement with network shares, but we strongly recommend against this method.

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

  • 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.

Connect your self-hosted database to Tricentis Notification Service

Once you've created your self-hosted database, you need to connect it to Tricentis Notification Service:

  1. Open Tricentis Service Configuration and go to the Notification Service tab.

  2. Enter a valid connection into the Database connection field.

  3. Restart the service in the Windows Services app.

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:

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.

Perform additional, optional 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.dll.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 change the following configurations for the data transfer from Notification Service to consumer:

  • How Tricentis Notification Service handles the basics: number of retries, batch size, and sending strategy.

  • How Tricentis Notification Service handles Kestrel limits. The service uses the default limits described in the Microsoft documentation. If this doesn't work for your environment, you can override them.

To change your configurations, 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. To change a Kestrel limit, create a corresponding property on the root level of the appsettings.json file. For information on Kestrel property names, check out the Microsoft documentation.

    Let's say you want to change the limit of the Kestrel property MaxResponseBufferSize. The default value is 30,000,000 bytes, but you want to increase it to 50,000,000 bytes. In this case, add the following property on the root level of the appsettings.json file:

Copy
{
"Kestrel": { 
    "Limits": { 
       "MaxResponseBufferSize": 50000000, 
    }     
},
  1. Save and close the file.

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

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.