> 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/command-line-interface/search-test-repositories.md).

# Search Test Repositories

The `search_testrepo` commands manage the recurring scheduled scan that discovers test cases in your configured test repository adapters. This scan replaced the legacy `testrepo run` command from earlier versions.

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

## Schedule a search

### `slabapcli search_testrepo run`

Registers (or updates) a Windows Scheduled Task that runs the test repository search on a cron schedule. The task is registered per pipeline and test repository combination.

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

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

{% endcode %}
{% endtab %}

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

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

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

| Parameter    | Short flag | Required | Description                                                                                                             |
| ------------ | ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| `--pipeline` | `-p`       | Yes      | The pipeline name (must match a `[[pipeline]].name` value in `config.toml`).                                            |
| `--testrepo` | `-t`       | Yes      | The test repository name (must match a `[[testrepo]].name` linked to this pipeline).                                    |
| `--cron`     | —          | No       | A 5-field cron expression (`minute hour day-of-month month day-of-week`). Default: `0 2 * * 0` (every Sunday at 02:00). |

{% hint style="info" %}
The cron expression uses 5 fields in standard Unix cron format. Example values:

* `0 2 * * 0` — every Sunday at 02:00 (default)
* `0 3 * * 1-5` — Monday through Friday at 03:00
* `0 1 * * *` — every day at 01:00
  {% endhint %}

#### Example

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

```batch
slabapcli.exe search_testrepo run --pipeline "ALM_Demo-S21" --testrepo "ALM_Demo-qtest"
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe search_testrepo run --pipeline 'ALM_Demo-S21' --testrepo 'ALM_Demo-qtest'
```

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

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

```log
.\slabapcli.exe search_testrepo run --pipeline 'ALM_Demo-S21' --testrepo 'ALM_Demo-qtest'
[2026-03-08 11:00:00.123+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Search task scheduled for 'ALM_Demo-qtest' (pipeline: 'ALM_Demo-S21').
```

{% endcode %}

{% hint style="info" %}
The scheduled task resolves `watcher.exe` from the path configured in `settings.install`. Verify that `settings.install` points to the ABAP Agent `bin` directory (the folder that contains `watcher.exe` and `slabapcli.exe`). If the path is incorrect, the task will fail when it runs. Use `slabapcli setup status` to check.
{% endhint %}

***

## Stop a scheduled search

### `slabapcli search_testrepo stop`

Removes the Windows Scheduled Task for the specified pipeline and test repository. Running searches that are already in progress are not interrupted; only the schedule is removed.

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

```batch
slabapcli.exe search_testrepo stop --pipeline <pipeline> --testrepo <name>
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe search_testrepo stop --pipeline <pipeline> --testrepo <name>
```

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

| Parameter    | Short flag | Required | Description               |
| ------------ | ---------- | -------- | ------------------------- |
| `--pipeline` | `-p`       | Yes      | The pipeline name.        |
| `--testrepo` | `-t`       | Yes      | The test repository name. |

#### Example

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

```batch
slabapcli.exe search_testrepo stop --pipeline "ALM_Demo-S21" --testrepo "ALM_Demo-qtest"
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe search_testrepo stop --pipeline 'ALM_Demo-S21' --testrepo 'ALM_Demo-qtest'
```

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

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

```log
.\slabapcli.exe search_testrepo stop --pipeline 'ALM_Demo-S21' --testrepo 'ALM_Demo-qtest'
[2026-03-08 11:02:00.456+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Scheduled search task for 'ALM_Demo-qtest' (pipeline: 'ALM_Demo-S21') was removed.
```

{% endcode %}

***

## Check search status

### `slabapcli search_testrepo status`

Shows the current Windows Scheduled Task state and the result of the last search run for the specified pipeline and test repository.

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

```batch
slabapcli.exe search_testrepo status --pipeline <pipeline> --testrepo <name>
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe search_testrepo status --pipeline <pipeline> --testrepo <name>
```

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

| Parameter    | Short flag | Required | Description               |
| ------------ | ---------- | -------- | ------------------------- |
| `--pipeline` | `-p`       | Yes      | The pipeline name.        |
| `--testrepo` | `-t`       | Yes      | The test repository name. |

#### Example

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

```batch
slabapcli.exe search_testrepo status --pipeline "ALM_Demo-S21" --testrepo "ALM_Demo-qtest"
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe search_testrepo status --pipeline 'ALM_Demo-S21' --testrepo 'ALM_Demo-qtest'
```

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

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

```log
.\slabapcli.exe search_testrepo status --pipeline 'ALM_Demo-S21' --testrepo 'ALM_Demo-qtest'
[2026-03-08 11:04:00.789+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Scheduler: task is registered and enabled, next run: 2026-03-15 02:00:00.
Last run: process 'proc-abc123' status: Done, upload status: Done
```

{% endcode %}

The status output reports:

* **Scheduler state** — whether the task is registered, enabled or disabled, and when the next run is scheduled.
* **Last run** — the process ID, process state (`Running`, `Done`, `Error`), and upload state (`Pending`, `Done`, `Error`) for the most recent completed search. If no run has been recorded, `no prior run recorded` is shown.


---

# 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/command-line-interface/search-test-repositories.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.
