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 |
|---|---|
|
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. |
|
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. |
|
|
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. |
|
|
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. |
|
|
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:
-
If you haven't yet, get SeaLights (opens in new tab).
-
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:
I host my application under test in a central location.If all Tosca machines that run tests do so against a shared, central instance of the application, you need one SeaLights agent. This agent handles the data for the application under test in the central location.
I have my application under test installed on the machines that run my tests.If each Tosca machine that runs tests has its own local instance of the application, you need one SeaLights agent per instance. This agent handles the data for that instance of your application under test.
If all instances have the same build session ID and you want to run tests on multiple machines at the same time, you have to tell SeaLights which data each agent has, the application instance it belongs to, and which testing machine to report to. To do so, set up a Lab ID in SeaLights. For detailed information, check out the SeaLights manual about integrated builds (opens in new tab) and parallel test execution (opens in new tab).
Let's say you have three machines that run your Tosca tests:
-
Machine 1 has its own local instance of the application.
-
Machine 2 has its own local instance of the application.
-
Machine 3 has its own local instance of the application.
In this case, you need three SeaLights agents:
-
SeaLights agent A for the instance on machine 1.
-
SeaLights agent B for the instance on machine 2.
-
SeaLights agent C for the instance on machine 3.
Additionally, if all instances of your application have the same build session ID and you plan to run tests at the same time, you need to set up a Lab ID.
-
-
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.
-
-
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:
-
In Tosca, open a workspace that belongs to the repository you want to connect.
-
Right-click the project root element and select Connect to SeaLights from the context menu.
-
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.