Skip to main content
Glama

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

NameRequiredDescriptionDefault
waitNotrue (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.
scopeNoWhich 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.
detailNoHow 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
runnerNoasync (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_nameYesClass whose tests run.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / detail / description
      Previous value: -"How much of the answer to return: \"terse\" (default, the fields you need to act), \"full\" (the whole parse), \"raw\" (the document as ADT sent it)."New value: +"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."
    • changedInput schema / properties / detail / enum
      Previous value: -[
      -  "terse",
      -  "full",
      -  "raw"
      -]New value: +[
      +  "terse",
      +  "medium",
      +  "full",
      +  "raw"
      +]
    • changedInput schema / properties / runner / description
      Previous value: -"async (default): starts the run, waits for it within a bound and returns the result, or the run_id of a run that outlasts the bound, whose status and result are read by run_id; suited to long suites. sync: one request that returns the finished result."New value: +"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."
    • addedInput schema / properties / wait
      Added value: +{
      +  "description": "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.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv20.1.0
    • addedInput schema / properties / runner
      Added value: +{
      +  "default": "async",
      +  "description": "async (default): starts the run, waits for it within a bound and returns the result, or the run_id of a run that outlasts the bound, whose status and result are read by run_id; suited to long suites. sync: one request that returns the finished result.",
      +  "enum": [
      +    "async",
      +    "sync"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "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.",
      +  "properties": {
      +    "add_foreign_tests_as_preview": {
      +      "description": "List the foreign tests as a preview, unexecuted (default true).",
      +      "type": "boolean"
      +    },
      +    "foreign_tests": {
      +      "description": "Execute the foreign tests, those linked by an ABAP Doc @testing relation (default false).",
      +      "type": "boolean"
      +    },
      +    "own_tests": {
      +      "description": "Include the object's own tests (default true).",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed9 schema fields changedv16.0.0
    • addedInput schema / properties / class_name
      Added value: +{
      +  "description": "Class whose tests run.",
      +  "type": "string"
      +}
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Optional context string shown in SAP tools.",
      -  "type": "string"
      -}
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "terse",
      +  "description": "How much of the answer to return: \"terse\" (default, the fields you need to act), \"full\" (the whole parse), \"raw\" (the document as ADT sent it).",
      +  "enum": [
      +    "terse",
      +    "full",
      +    "raw"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / duration
      Removed value: -{
      -  "properties": {
      -    "long": {
      -      "type": "boolean"
      -    },
      -    "medium": {
      -      "type": "boolean"
      -    },
      -    "short": {
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / risk_level
      Removed value: -{
      -  "properties": {
      -    "critical": {
      -      "type": "boolean"
      -    },
      -    "dangerous": {
      -      "type": "boolean"
      -    },
      -    "harmless": {
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / scope
      Removed value: -{
      -  "properties": {
      -    "add_foreign_tests_as_preview": {
      -      "type": "boolean"
      -    },
      -    "foreign_tests": {
      -      "type": "boolean"
      -    },
      -    "own_tests": {
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / tests
      Removed value: -{
      -  "description": "List of container/test class pairs to execute.",
      -  "items": {
      -    "properties": {
      -      "container_class": {
      -        "description": "Class that owns the test include (e.g., ZCL_MAIN_CLASS).",
      -        "type": "string"
      -      },
      -      "test_class": {
      -        "description": "Test class name inside the include (e.g., LTCL_MAIN_CLASS).",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "container_class",
      -      "test_class"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / title
      Removed value: -{
      -  "description": "Optional title for the ABAP Unit run.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "tests"
      -]New value: +[
      +  "class_name"
      +]
  4. First observed

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden. It does disclose the key behavioral trait — that the call blocks for the result or returns a run_id immediately — which is useful non-obvious context. It omits permissions/authorization needs, whether tests have side effects or mutate state, and where results are retrievable beyond the run_id.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tightly written sentence with the resource and the two execution outcomes front-loaded, no filler. Slightly informal phrasing ('giving the run's id at once') and the absent naming of the underlying parameters keep it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with a nested object, no annotations and no output schema, the description is thin: it says nothing about what the returned result contains or how detail levels shape it, leaving that to the schema. Enough to call correctly, but not enough to set expectations about output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters, including the nested scope object and the detail/runner enums, are already documented. The description adds only the high-level wait-vs-id framing, which the wait schema entry already elaborates far more richly. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Runs the ABAP Unit tests of an ABAP class (CLAS)'. The phrase 'waiting for the result or giving the run's id at once' also summarizes the two execution modes. Sibling differentiation is only implicit through the 'ABAP class' scope (vs RunProgramUnitTest/RunFunctionGroupUnitTest), so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies two usage modes but never states when to pick this tool over the other Run*UnitTest siblings, nor any prerequisites such as the class existing or being active. The real when-to-use guidance ('suited to long suites', 'a long run under a client with a request time limit is started with false') lives in the schema's runner/wait parameter descriptions, not the tool description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools