Set up the SeaLights integration

If you integrate Tosca with Tricentis SeaLights, you can reduce test costs and effort by running only relevant tests for changed code. This topic explains how to set up the integration:

  • Important SeaLights concepts that will help you better understand your integration tasks.

  • What to prepare in SeaLights.

  • What to prepare for Tosca.

  • How to connect your Tosca repository to your SeaLights tenant.

Important concepts

If you’re new to SeaLights, here are a few key concepts to help you with your integration tasks:

Concept

Description

SeaLights agent

Background process that collects code and test coverage data during test runs. It sends this data to SeaLights.

SeaLights offers agents for different technologies, such as Java and .NET, as well as CI tools like Jenkins.

SeaLights

AI-powered software quality intelligence platform. SeaLights collects code and test coverage data from its agents and analyzes it. Based on the results, SeaLights instructs Tosca which tests to skip for a particular test run.

SeaLights agent token

A unique identifier that authenticates a SeaLights agent with the SeaLights platform. It ensures that agent data is securely linked to the correct account and project.

Build session ID

A unique identifier that defines the version of your application under test. Each build has its own build session ID, which groups all related test and coverage data.

Build session ID file

A file that stores the build session ID. Typically, you create this file when you set up your SeaLights agent.

The build session ID file helps link the collected data to the correct build when the SeaLights agent sends information to the SeaLights platform.

To enable the SeaLights optimization for specific tests, your team needs the path to the build session ID file or the Lab ID.

Lab ID

A unique identifier that defines the test environment or instance you're testing. This identifier also specifies which builds and agents belong together.

It's optional to configure the Lab ID in SeaLights. However, it's useful if you have your application under test installed on multiple machines and want to run tests in parallel.

To enable the SeaLights optimization for specific tests, your team needs the Lab ID or the path to the build session ID file.

Prepare SeaLights

SeaLights offers many options to customize the platform's setup and behavior. For details, check out the SeaLights manual (opens in new tab).

This section describes the base steps to prepare SeaLights for an integration with Tosca:

  1. If you haven't yet, get SeaLights (opens in new tab).

  2. Set up SeaLights agents as described in the SeaLights agent manual (opens in new tab).

    Where you host your application under test determines how many SeaLights agents and which additional configurations you may need. Please choose your use case:

  3. Decide how your team should enable the SeaLights optimization for specific tests. You can choose one of the following options:

    • If you want to use the build session ID, make sure your team knows the path to the build session ID file.

    • If you want to use the Lab ID, make sure your team knows the Lab ID.

      Note that if you use the Lab ID, you must have at least one SeaLights agent with the same Lab ID. This agent has to be running at the time your team triggers a test run, or SeaLights can't optimize tests.

  4. Create a SeaLights agent token as described in the SeaLights token manual (opens in new tab). You will need it to connect Tosca and SeaLights.

Prepare Tosca

The Tosca and SeaLights integration follows a Cloud First approach. To optimize tests with SeaLights, you need to run them via the Tosca Cloud test execution integration. So, if you haven't set up the integration yet, do so now.

Of course, you can always optimize debugging tests that you run via ExecutionList on a local machine. In this case, you don't need to prepare anything.

Connect Tosca and SeaLights

Last, but not least, connect your Tosca repository to SeaLights.

Before you start

To connect to your SeaLights tenant, you need to have the following things: 

  • An administrator account for Tosca.

  • The SeaLights agent token you created when you prepared SeaLights.

Establish the connection

To establish the connection between Tosca and SeaLights, follow these steps:

  1. In Tosca, open a workspace that belongs to the repository you want to connect.

  2. Right-click the project root element and select Connect to SeaLights from the context menu.

  3. Enter your SeaLights agent token and select Connect.

You can connect multiple repositories to the same SeaLights tenant. Repeat this process to connect additional repositories.

What's next

The integration is complete. Success! Now, your team can optimize test runs with SeaLights.