RunUnitTest
Executes ABAP Unit tests for a specified class, returning completed results or a run ID for later status checks. Use it to validate ABAP class behavior in SAP systems.
Instructions
Runs the ABAP Unit tests of an ABAP class (CLAS), waiting for the result or giving the run's id at once.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"class_name": "<class_name>"
},
"name": "RunUnitTest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | true (default): the call reads the run's status at once, and a run SAP answers running again by long polling, SAP holding each read until the run finishes, and returns the result of a run SAP answers finished, the call lasting as long as the run; a run SAP reports unstarted is read again by long polling, and a run that long-polled read reports unstarted returns the run_id and that status, and any other status is an error stating what SAP answered. false: the call answers the run_id right after the start, and the run's status and result are read by run_id. A long run under a client with a request time limit is started with false. | |
| scope | No | Which tests the run covers, sent with either runner. Foreign tests are test classes linked to the object by an ABAP Doc @testing relation (a function module's tests are often linked so). With runner sync they execute only with foreign_tests true: with the defaults (foreign_tests false, add_foreign_tests_as_preview true) SAP lists them as a preview, unexecuted. Runner async executes them with the defaults as well. | |
| detail | No | How much of the answer to return: "terse" (default) what a next call needs: the identifiers and a short description; "medium" every item the tool read, with its main properties; "full" the tool's whole answer; "raw" what SAP sent. | terse |
| runner | No | async (default): starts the run; wait decides whether the call returns the result once the run finished or the run_id right after the start; suited to long suites. sync: one request that returns the finished result, called with wait left out. | async |
| class_name | Yes | Class whose tests run. |