CreateCdsUnitTest
Creates an ABAP Unit test class for a CDS view from supplied test source, verifies the view supports test doubles, and activates the class in the specified package.
Instructions
Creates the ABAP Unit test class named by class_name for the CDS view named by cds_view_name, from test_class_source. The view is checked to support CDS test doubles, the test class holding the local test classes is created in the package named by package_name, and it is activated. Runs outside batch mode.
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": {
"cds_view_name": "<cds_view_name>",
"class_name": "<class_name>",
"package_name": "<package_name>",
"test_class_source": "<test_class_source>"
},
"name": "CreateCdsUnitTest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | 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). | terse |
| class_name | Yes | Name of the new global class that holds the tests. | |
| package_name | Yes | Package of the new test class. | |
| cds_view_name | Yes | CDS view under test (DDL source). Must be active and testable with test doubles. | |
| test_class_source | Yes | ABAP source of the local test classes: definitions and implementations, FOR TESTING. | |
| transport_request | No | Transport request, not a task. Required for a transportable package. |