> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/tosca/run-a-test-in-tosca.md).

# Run a test in Tosca Commander

After you [connect Tosca Commander](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/tosca/connect-tosca-to-sealights.md) and have created a Footprints scheduled task, configure Tosca so each run associates with your SeaLights app's latest Build Modification.

{% hint style="warning" %}
When you create the ABAP pipeline with `pipeline set`, **leave `--labid` unset** unless you deliberately need to override it. The agent derives the default lab ID as `<QAS SID> <QAS RFC hostname>`. Casual overrides can break **Test Cycles** in SeaLights. See [Create and list pipelines](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/create-and-list-pipelines.md).
{% endhint %}

## Test-runner integration

1. Ensure the SeaLights integration is enabled in Tosca Commander (see the Tricentis [integration overview](https://documentation.tricentis.com/tosca/2510/en/content/sealights_integration/sealights_integration_overview.htm)).
2. On the execution list, playlist, or configuration you use for ABAP testing:

**SeaLightsLabId** in Tosca Commander or Tosca Cloud must match the **labid** of your ABAP pipeline:

1. On the agent host, run `pipeline list` (no parameters). Syntax and example output: [Create and list pipelines](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/create-and-list-pipelines.md).
2. In the output, find the block for your pipeline and note the **labid** line (for example, `labid : S21 vwsvtstsap13.tricentis.com`).
3. Set **SeaLightsLabId** on your Tosca execution list, playlist, or configuration parameters to that value (without the `labid` label).
4. Set **SeaLightsOptimization** = **true** when you want SeaLights Test Optimization to influence which tests run.

{% hint style="danger" %}
Playlist and configuration parameter names are **case sensitive**.
{% endhint %}

{% hint style="info" %}
Exact screens differ by Tosca Commander version. If a parameter is not visible, follow the Tricentis SeaLights integration guide for your release.
{% endhint %}

Once the test repository is configured and the connection test succeeds:

1. Finish any remaining agent setup for the pipeline (RFC, pipeline, additional test repositories) if you have not already.
2. Schedule repository search with `search_testrepo`.
3. Capture coverage with Footprints and your test runs.

For the full setup order, see [Start the ABAP Agent Server](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/start-the-agent-server.md) and [Configure Test Repositories](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/configure-test-repositories.md).

`search_testrepo` registers a Windows Scheduled Task that runs `watcher.exe SEARCH_TESTREPO` on a cron schedule.

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

```batch
slabapcli.exe search_testrepo run --pipeline <pipeline> --testrepo <name> [--cron "<cron>"]
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Schedule a search" overflow="wrap" %}

```powershell
.\slabapcli.exe search_testrepo run --pipeline <pipeline> --testrepo <name> [--cron '<cron>']
```

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

| Parameter    | Required | Description                                                         |
| ------------ | -------- | ------------------------------------------------------------------- |
| `--pipeline` | Yes      | Pipeline name (`[[pipeline]].name`).                                |
| `--testrepo` | Yes      | Test repository name (`[[testrepo]].name`) linked to that pipeline. |
| `--cron`     | No       | 5-field cron expression. Default: `0 2 * * 0` (Sunday at 02:00).    |

Full command reference (stop, list, prerequisites): [Search Test Repositories](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/search-test-repositories.md).

SeaLights associates test executions with ABAP code changes through **Footprints** on the agent side.

{% stepper %}
{% step %}

## Schedule Footprints for the pipeline

```batch
slabapcli.exe footprints run --pipeline <pipeline-name>
```

This creates a `FOOTPRINTS` scheduled task that periodically collects coverage-related data and sends it to SeaLights. Full syntax and stop command: [Collect Footprints data for your Pipeline](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/collect-footprints-data-for-your-pipeline.md).
{% endstep %}

{% step %}

## Run tests against the QAS system

Execute tests that exercise the ABAP components you care about while Footprints is collecting. The agent matches executed ABAP components against objects in the latest Build Modification and reports them as footprints.
{% endstep %}

{% step %}

## Wait for processing, then check the Coverage Report

SeaLights needs time to process Footprints data. When processing completes, covered ABAP components appear in your application's Coverage Report.
{% endstep %}
{% endstepper %}

## Run the test and verify coverage

1. Confirm Footprints is scheduled: `slabapcli footprints run --pipeline <pipeline-name>` (see [Collect Footprints data](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/collect-footprints-data-for-your-pipeline.md)).
2. Run the Tosca Commander execution that targets your QAS system.
3. Wait for SeaLights to process Footprints data, then open the Coverage Report for your application.

If the test executes ABAP components that appear in the latest Build Modification, those components show as covered.

## Test Impact Analysis (TIA)

Use TIA after you have baseline coverage and a working code-to-test mapping from repository search:

{% stepper %}
{% step %}

### Enable Test Optimization in SeaLights

In the SeaLights dashboard for your application, enable **Test Optimization**. SeaLights then recommends only tests impacted by code changes instead of the full suite.
{% endstep %}

{% step %}

### Keep repository search current

Ensure `search_testrepo` is scheduled for your Tosca Commander repository so recommendations stay aligned with the tests in Tosca.
{% endstep %}

{% step %}

### Process a transport (build modification)

Import or process a transport that contains known code changes so the agent creates a Build Modification. See [Monitor your Pipeline for Build Modifications](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/monitor-your-pipeline-for-build-modifications.md).
{% endstep %}

{% step %}

### Re-run with SeaLightsOptimization

Run the same Tosca Commander suite again with **SeaLightsLabId** set and **SeaLightsOptimization** = **true**. Observe that only the recommended (impacted) tests execute, then review results on the SeaLights **Test Optimization** screen.

Tricentis also documents optimization here: [Optimize your Tosca test run with SeaLights](https://documentation.tricentis.com/tosca/2510/en/content/sealights_integration/sealights_optimization.htm).
{% endstep %}
{% endstepper %}

## Related

* [Tosca Cloud](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/tosca-cloud.md) — Cloud playlists and TIA
* [Show the value with Test Cycles](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/show-the-value-with-test-cycles.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/tosca/run-a-test-in-tosca.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
