> For the complete documentation index, see [llms.txt](https://sealights-docs.tricentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sealights-docs.tricentis.com/setup-and-configuration/guides/setup-and-installation.md).

# Setup and installation

Set up ABAP Agent 2.1 through initial build map and search\_testrepo — for any supported test repository.

This guide is **Part 1** of the ABAP Agent 2.1 onboarding path. It takes you from install through a finished **initial build map** and a successful **`search_testrepo`** check.

It applies to **all supported test repositories** (Azure DevOps, Tosca Commander, Tosca Cloud, Excel, Xray, qTest, Certify, [SAP Solution Manager (SSM)](broken://pages/Wm5uastLy6VrpwVlLOxz), OpenText ALM, [OpenText Octane](broken://pages/5p9tfpQ6QUDDh7eGyJEc), [SAP Cloud ALM](broken://pages/YqgNK81CxPbBgmGxbRxU)). Adapter-specific connection details are under [Test Tool Integrations](broken://pages/X3jEQR7gju1fIaT7v4vC).

**Next:** [Show the value with Test Cycles](broken://pages/EXMBmOkLCBbhPiWjM2ki) (Part 2). For Tosca Cloud runner + TIA beyond day-zero recommendations, see [Tosca Cloud runner and TIA](broken://pages/zVhfQlDB3kh3AEmmVE1X) (Part 3).

After you start the ABAP Agent server later in this guide, the **SeaLights ABAP Server** Windows service must remain running for ongoing operation.

## What you will have at the end

* ABAP Agent 2.1 installed and configured (SeaLights token, RFC Destinations, pipeline, at least one test repository)
* SAP authorizations and `setup status` healthy
* **SeaLights ABAP Server** Windows service running (`slabapcli server status` or `GET /ready` returns healthy)
* Initial build map completed for the pipeline
* At least one successful `search_testrepo` smoke check

{% hint style="warning" %}
**What you will** ***not*** **see in the SeaLights UI during this part**

* The initial build map is **not** shown as a progress UI beyond the fact that a **build** exists for the application.
* **Overall / full-application coverage** is not presented for this flow.
* After build modifications (Part 2), SeaLights focuses on **change coverage** and test impact — not a full-system coverage percentage from the initial map.
  {% endhint %}

## Prerequisites

Before you begin, make sure the following are in place:

{% stepper %}
{% step %}

### Install the SAP add-on and Windows agent

Follow the install tree end-to-end:

1. [Install the ABAP Agent](broken://pages/RVJ0Dzu84lPtG9vQelRG) (prerequisites, add-on, accounts, SCMON, Windows binaries)
2. [Create SAP accounts](broken://pages/5ncObY0GqXSvLoeAyK83)

{% hint style="info" %}
The last step on that page assigns the **`/TRICE/SL_AUTHS`** role to the account. If you haven't generated that role yet, complete the **Authorizations** step below first, then return to finish account creation.
{% endhint %}
{% endstep %}

{% step %}

### Authorizations

Authorizations are part of the happy path — do not skip them until troubleshooting.

1. Generate / assign the SeaLights authorization role — [Generate Authorization Profiles](broken://pages/JfFkO1xqq9huG22WXqhI) (includes the authorization objects table)
2. Assign **`/TRICE/SL_AUTHS`** (and related objects) to the RFC service user used by the agent on the QAS system
3. For the Production system, grant the PRD RFC user the authorizations for your Production configuration (with or without the add-on) — see [Production system authorizations](broken://pages/JfFkO1xqq9huG22WXqhI#production-system-authorizations)
4. If later checks fail, use [Troubleshooting — SAP authorization role issues](broken://pages/DTAUuyOmlKawT2B8UTYM#diagnosing-sap-authorization-role-issues)
   {% endstep %}

{% step %}

### Set up the agent

Initialize the ABAP agent on the Windows host. Run it from the agent's `bin` directory in a terminal opened as an Administrator. It generates the encryption key and the default configuration file, and registers the **SeaLights ABAP Server** Windows service. It does **not** start the server: after you set the SeaLights token in the next step, start it with `slabapcli server start` (see [Start the ABAP Agent server](#start-the-abap-agent-server)).

Full reference: [Set up the agent](broken://pages/54pGpo5ULmlonbluKqHL). Use schema migrate only if you are already on 2.0+.
{% endstep %}

{% step %}

### Connect to SeaLights

Store your SeaLights agent token in the encrypted configuration.

The token is **cold** — the server reads it when the service starts, so set it before the first server start (if it is missing, the server starts but reports `not_ready`) and restart the service after you change it. Run `sealights test` to confirm connectivity; it is recommended but not a hard gate before `slabapcli server start`.
{% endstep %}

{% step %}

### Start the ABAP Agent server

Start the **SeaLights ABAP Server** Windows service immediately after setting the SeaLights token.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe server start
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe server start
```

{% endcode %}
{% endtab %}
{% endtabs %}

Confirm readiness:

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe server status
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe server status
```

{% endcode %}
{% endtab %}
{% endtabs %}

Full reference: [Start the ABAP Agent Server](broken://pages/jjXJbDJ9CnFBYzl2NDMP). If the service fails to start, check `{userdata}\public\Logs\server-YYYYMMDD.log` (`{userdata}` defaults to `%ProgramData%\Tricentis\SeaLights\ABAP Agent`) and [Troubleshooting — Server Issues](broken://pages/DTAUuyOmlKawT2B8UTYM#server-issues).
{% endstep %}

{% step %}

### Create RFC Destinations

Create an RFC Destination for each SAP system (QAS and PRD) that the agent needs to connect to.

{% hint style="info" %}
Repeat this command for every SAP system the pipeline will use (for example, once for QAS and once for PRD). Full reference: [Create, Test & List RFC Destinations](broken://pages/zPfkH57Cxw3SCdFvArqI).
{% endhint %}
{% endstep %}

{% step %}

### Create a pipeline

Link your QAS and Production systems to a SeaLights application by creating a pipeline.

Full reference: [Create & List Pipelines](broken://pages/edqS0kWLEcXgW4rYb5N5).
{% endstep %}

{% step %}

### Configure a test repository

Configure at least one test repository for **your** adapter type. Each adapter page under [Test Tool Integrations](broken://pages/X3jEQR7gju1fIaT7v4vC) has a type-specific `testrepo set` example. Full CLI options are in [Configure Test Repositories](broken://pages/RZTKL0g90WmKm4Prs0gG). After you save, `testrepo set` can run its automatic connection test.
{% endstep %}

{% step %}

### Validate with `setup status`

Before build-map or search work, run the comprehensive validation gate:

```batch
slabapcli.exe setup status
```

This checks SeaLights connectivity, RFC connections, SAP authorizations, SCMON state, and agent-side prerequisites. Exit code `0` means you can continue.

Full reference: [Validate Your Setup](broken://pages/A8FSceuQXginyDTL5f4z).
{% endstep %}

{% step %}

### Run the initial build map

Create an Initial Build Map for the pipeline. This scans QAS for ABAP components in use in Production and sends them to SeaLights.

When it completes, confirm in SeaLights that the application has a **build**. Do not expect a dedicated "initial build map progress" UI or overall coverage dashboard from this step.

{% hint style="warning" %}
**Before Build Modifications (Part 2):** Wait until the Initial Build Map has finished successfully for this pipeline before starting Build Mods (`buildmods run` or watcher `BUILD_MODS`). Do not start Build Mods while `INIT_BUILD_MAP` is still running.
{% endhint %}

Full reference: [Create an Initial Build Map for your Pipeline](broken://pages/6f4WDLP7ZxZdqhvqwcMb).
{% endstep %}

{% step %}

### Smoke-test `search_testrepo`

Schedule repository search and confirm the agent can discover matching tests for known search terms or changed contexts.

If search fails, check server and adapter logs — [Configuration settings — Log locations](broken://pages/DZM4uWEu5r51kMDWCmDB#log-locations) and [Troubleshooting](broken://pages/DTAUuyOmlKawT2B8UTYM).
{% endstep %}
{% endstepper %}

## Troubleshooting

## Schedule the purger

The agent keeps writing logs and per-run artifacts (test-repository search results, impacted graphs, discovered transports) under the userdata directory (default: `%ProgramData%\Tricentis\SeaLights\ABAP Agent`). Schedule the purger so these files do not accumulate. Run the command from the agent's `bin` directory in a terminal opened as an Administrator, because it registers a Windows scheduled task:

```batch
slabapcli.exe purger run
```

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe purger run
[2025-06-18 15:07:58.336+01:00] [info] Detected Windows version: Windows 11
[2025-06-18 15:07:58.337+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2025-06-18 15:07:58.370+01:00] [info] Scheduled purger run with retention period specified in the config file, interval: 01:00:00, duration: 1 day(s) and 00:00:00
```

{% endcode %}

This creates the `PURGER` scheduled task, which runs `purger.exe` every hour and deletes:

* Log files (`*.log`) under `public\Logs` in the userdata directory and under `public\Logs` in the system (ProgramData) directory — the purger cleans both locations
* Private artifacts (`*.json`, `*.db`, `*.xml`) under the `SearchTestRepo`, `TestTestRepo`, `Graph`, `BuildModifications`, and `DiscoveredTransports` folders in `private`

Only files older than the retention period are deleted. The retention period is `[logging].retentionperiod` in `config.toml` (default: `14` days). The purger writes its own log to `public\Logs\purger_YYYY-MM-DD.log`.

To stop scheduled purging (also from an elevated terminal):

```batch
slabapcli.exe purger stop
```

{% hint style="info" %}
If you upgrade from an agent version that used the `PURGE_LOGS` task, the installer migrates it to `PURGER` and keeps its settings.
{% endhint %}

## Done with Part 1

Continue to [Show the value with Test Cycles](broken://pages/EXMBmOkLCBbhPiWjM2ki) to import transports, open a Test Cycle, and demonstrate recommendations, gaps, and change coverage.

## Related reading

* [SAP objects support](broken://pages/W91lfYHxi5z8fYg7EK6F)
* [Test Tool Integrations](broken://pages/X3jEQR7gju1fIaT7v4vC)
* [Fiori support](broken://pages/ZslbGtlcKtkEs84gV7Iz)
