Run ABAP Unit Tests
run_unit_testsExecutes ABAP Unit test classes for a class or program and reports each test method as passed or failed with alert details and a total, with optional risk-level and duration filters.
Instructions
Run the ABAP Unit test classes of an object and report each test method as passed or failed with its alert details, plus a total. A class with no method results is reported as unknown, not passed. By default runs all risk levels and durations; narrow with riskLevels and durations. Executes the test code on the SAP system, which can change data if the tests do; use abap_run_class to run a console class instead and run_atc_analysis for static checks.
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": {
"url": "<url>"
},
"name": "run_unit_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ADT URL of the class or program that holds the tests (e.g. /sap/bc/adt/oo/classes/zcl_order_api) | |
| durations | No | Only run test classes of these durations (default: all) | |
| riskLevels | No | Only run test classes of these risk levels (default: all) | |
| connectionId | No | SAP system connection ID |