# Template for MCP ABAP ADT test configuration
# Copy this file to test-config.yaml and fill in real values before running tests
#
# Tests are organized in groups with dependencies:
# 1. Transport -> 2. Package -> 3. Create -> 4. Update -> 5. Get -> 6. Delete
# Each object type uses the same object name across all operations
# ============================================================================
# TEST SETTINGS
# ============================================================================
# ============================================================================
# GLOBAL CONFIGURATION
# ============================================================================
# ============================================================================
# GLOBAL CONFIGURATION
# ============================================================================
test_settings:
fail_fast: false
verbose: true
timeout: 120000 # Global test timeout (ms)
retry_on_failure: false
max_retries: 1
cleanup_after_test: false # Legacy flag (handlers use environment.cleanup_after instead)
# Timeouts for different operations (ms)
timeouts:
default: 120000
long: 400000 # Long timeout for complex flows (e.g., group deletion)
create: 120000
test: 120000
delay: 3000 # Delay after delete/create operations
# Operation delays (ms) - wait for SAP to persist state between steps
operation_delays:
lock: 3000
unlock: 3000
update: 3000
create: 3000
default: 3000
# Session persistence configuration
session_config:
persist_session: true # Persist cookies/CSRF tokens between steps
sessions_dir: ".sessions" # Directory (relative to repo) for session files
session_id_format: "auto" # "auto" or custom pattern
cleanup_session_after_test: true
# Lock persistence configuration
lock_config:
locks_dir: ".locks" # Directory (relative to repo) for lock files
persist_locks: true # Track locks across steps for safety
environment:
default_package: "<YOUR_PACKAGE_NAME>" # Test package from GROUP 2
default_transport: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
default_system: "<YOUR_SYSTEM>" # ⚠️ UPDATE WITH YOUR SYSTEM (e.g., E19)
default_client: "<YOUR_CLIENT>" # ⚠️ UPDATE WITH YOUR CLIENT (e.g., 100)
# Cleanup configuration (applies to all tests)
cleanup_after: false # Clean up objects after test (default: false)
# Set to true to auto-delete objects after tests
# Note: cleanup_before was removed - not used in code
# ============================================================================
# AUTHENTICATION BROKER CONFIGURATION
# ============================================================================
# Configuration for AuthBroker-based token refresh before integration tests
# This allows tests to automatically refresh expired tokens using AuthBroker
# instead of relying solely on refresh tokens from .env file
auth_broker:
# Prefer auth-broker over .env (set MCP_USE_AUTH_BROKER=true)
use_auth_broker: true
# Use file-based session store (unsafe) to reuse saved sessions for tests (set MCP_UNSAFE=true)
unsafe: true
# Browser auth callback port (default 3001). Change if port is busy.
browser_auth_port: 3101
# Paths configuration (applies to both ABAP and BTP/XSUAA)
paths:
# Base directory for auth broker storage
# This is a BASE path - the system will automatically create service-keys/ and sessions/ subdirectories inside it
# Service key files: <base_path>/service-keys/<destination>.json (e.g., TRIAL.json, mcp.json)
# Session files: <base_path>/sessions/<destination>.env (e.g., TRIAL.env, mcp.env)
# Supports ~ (home directory) expansion on Unix
# Default values:
# Unix: ~/.config/mcp-abap-adt
# Windows: %USERPROFILE%\Documents\mcp-abap-adt
# ⚠️ IMPORTANT: This is a BASE path, not the service-keys or sessions directory itself!
# Example: ~/.config/mcp-abap-adt will create:
# - ~/.config/mcp-abap-adt/service-keys/<destination>.json
# - ~/.config/mcp-abap-adt/sessions/<destination>.env
service_keys_dir: <BASE_PATH> # ⚠️ UPDATE: Replace with your base directory path (e.g., ~/.config/mcp-abap-adt)
# ABAP destination configuration (for on-premise or cloud ABAP systems)
abap:
# ABAP destination name (used for service key file: <destination>.json and session file: <destination>.env)
# Example: "TRIAL" -> looks for TRIAL.json in service-keys directory and TRIAL.env in sessions directory
# This destination is used by refreshTokensForTests() to automatically refresh tokens before integration tests
# If not specified, token refresh will be skipped and tests will use tokens from .env file
destination: <TEST_ABAP_DESTINATION> # ⚠️ UPDATE: Replace with your ABAP destination name (e.g., "TRIAL", "mcp")
# ============================================================================
# OBJECT TESTS (High-Level, then Low-Level for each object)
# ============================================================================
# Behavior Definition (Behavior Definition - Low-Level)
create_behavior_definition_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
name: "<YOUR_BEHAVIOR_DEFINITION_NAME>"
description: "Test behavior definition created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
# ⚠️ IMPORTANT: root_entity MUST be an existing CDS view name (not just any name)
# The CDS view must exist in the SAP system before creating behavior definition
root_entity: "<YOUR_EXISTING_CDS_VIEW_NAME>" # ⚠️ UPDATE: Replace with existing CDS view name
implementation_type: "managed" # or "unmanaged", "abstract", "projection"
# ⚠️ REQUIRED: source_code is mandatory for update step
source_code: |
managed implementation in class zbp_<your_cds_view_name_lowercase> unique;
strict ( 2 );
define behavior for <YOUR_CDS_VIEW_NAME> //alias <alias_name>
persistent table <your_table_name>
lock master
authorization master ( instance )
{
create ( authorization : global );
update;
delete;
field ( readonly ) <field_name>;
association _children { create; }
}
define behavior for <YOUR_CHILD_ENTITY_NAME> //alias <alias_name>
persistent table <your_child_table_name>
lock dependent by _parent
authorization dependent by _parent
{
update;
delete;
field ( readonly ) <child_field_name>;
association _parent;
}
# ⚠️ REQUIRED for HighHandlers test: update_source_code is mandatory for update step
update_source_code: |
managed implementation in class zbp_<your_cds_view_name_lowercase> unique;
strict ( 2 );
define behavior for <YOUR_CDS_VIEW_NAME> //alias <alias_name>
persistent table <your_table_name>
lock master
authorization master ( instance )
{
create ( authorization : global );
update;
delete;
field ( readonly ) <field_name>;
field ( readonly ) <updated_field_name>;
association _children { create; }
}
define behavior for <YOUR_CHILD_ENTITY_NAME> //alias <alias_name>
persistent table <your_child_table_name>
lock dependent by _parent
authorization dependent by _parent
{
update;
delete;
field ( readonly ) <child_field_name>;
association _parent;
}
# ============================================================================
# METADATA EXTENSION - Low-Level Handler
# ============================================================================
# ============================================================================
# BEHAVIOR IMPLEMENTATION - High-Level Handler
# ============================================================================
# Behavior Implementation (Behavior Implementation - High-Level)
create_behavior_implementation:
test_cases:
- name: "builder_behavior_implementation"
enabled: false
description: "Behavior Implementation used by BehaviorImplementationBuilder workflow tests"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
class_name: "<YOUR_BEHAVIOR_IMPLEMENTATION_CLASS_NAME>"
description: "Behavior Implementation for <YOUR_BEHAVIOR_DEFINITION_NAME>"
# package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
# ⚠️ IMPORTANT: behavior_definition MUST be an existing Behavior Definition name
behavior_definition: "<YOUR_EXISTING_BEHAVIOR_DEFINITION_NAME>" # ⚠️ UPDATE: Replace with existing Behavior Definition name
# ⚠️ implementation_code is implementations include (local handler class), NOT main class
# Main class is created automatically with "FOR BEHAVIOR OF" clause
implementation_code: |
CLASS lhc_<your_behavior_definition_lowercase> DEFINITION INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
METHODS get_global_authorizations FOR GLOBAL AUTHORIZATION
IMPORTING REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
ENDCLASS.
CLASS lhc_<your_behavior_definition_lowercase> IMPLEMENTATION.
METHOD get_instance_authorizations.
ENDMETHOD.
METHOD get_global_authorizations.
ENDMETHOD.
ENDCLASS.
# ⚠️ update_implementation_code is for updating the implementations include
update_implementation_code: |
CLASS lhc_<your_behavior_definition_lowercase> DEFINITION INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
METHODS get_global_authorizations FOR GLOBAL AUTHORIZATION
IMPORTING REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
METHODS create FOR MODIFY
IMPORTING entities FOR CREATE <your_behavior_definition_lowercase>.
ENDCLASS.
CLASS lhc_<your_behavior_definition_lowercase> IMPLEMENTATION.
METHOD get_instance_authorizations.
ENDMETHOD.
METHOD get_global_authorizations.
ENDMETHOD.
METHOD create.
" Implementation for create operation
ENDMETHOD.
ENDCLASS.
# ============================================================================
# BEHAVIOR IMPLEMENTATION - Low-Level Handler
# ============================================================================
# Behavior Implementation (Behavior Implementation - Low-Level)
# Behavior Implementation (Behavior Implementation - Low-Level)
create_behavior_implementation_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Check → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
class_name: "<YOUR_BEHAVIOR_IMPLEMENTATION_CLASS_NAME>"
description: "Behavior Implementation for <YOUR_BEHAVIOR_DEFINITION_NAME>"
# package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
# ⚠️ IMPORTANT: behavior_definition MUST be an existing Behavior Definition name
behavior_definition: "<YOUR_EXISTING_BEHAVIOR_DEFINITION_NAME>" # ⚠️ UPDATE: Replace with existing Behavior Definition name
# ⚠️ source_code is implementations include (local handler class), NOT main class
# Main class is created by CreateClass and remains unchanged
source_code: |
CLASS lhc_<your_behavior_definition_lowercase> DEFINITION INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
METHODS get_global_authorizations FOR GLOBAL AUTHORIZATION
IMPORTING REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
ENDCLASS.
CLASS lhc_<your_behavior_definition_lowercase> IMPLEMENTATION.
METHOD get_instance_authorizations.
ENDMETHOD.
METHOD get_global_authorizations.
ENDMETHOD.
ENDCLASS.
# ⚠️ REQUIRED for update step: implementation_code is implementations include (local handler class) for update
implementation_code: |
CLASS lhc_<your_behavior_definition_lowercase> DEFINITION INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
METHODS get_global_authorizations FOR GLOBAL AUTHORIZATION
IMPORTING REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
ENDCLASS.
CLASS lhc_<your_behavior_definition_lowercase> IMPLEMENTATION.
METHOD get_instance_authorizations.
ENDMETHOD.
METHOD get_global_authorizations.
ENDMETHOD.
ENDCLASS.
# ⚠️ REQUIRED for HighHandlers test: update_source_code is implementations include (local handler class)
# ⚠️ NOTE: For managed behavior definitions, READ method is not needed (auto-generated)
update_source_code: |
CLASS lhc_<your_behavior_definition_lowercase> DEFINITION INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
METHODS get_global_authorizations FOR GLOBAL AUTHORIZATION
IMPORTING REQUEST requested_authorizations FOR <your_behavior_definition_lowercase> RESULT result.
ENDCLASS.
CLASS lhc_<your_behavior_definition_lowercase> IMPLEMENTATION.
METHOD get_instance_authorizations.
ENDMETHOD.
METHOD get_global_authorizations.
ENDMETHOD.
ENDCLASS.
# Class (Class)
# Class (Class)
create_class:
test_cases:
- name: "test_class_high"
enabled: true
description: "High-level test: create → update → delete class"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
class_name: "<YOUR_CLASS_NAME>"
description: "Test ABAP Class created via MCP ABAP ADT"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
superclass: ""
final: false
abstract: false
create_protected: false
source_code: |
CLASS <YOUR_CLASS_NAME> DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: constructor.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CLASS_NAME> IMPLEMENTATION.
METHOD constructor.
" Initialization logic here
WRITE: / 'Class instance created'.
ENDMETHOD.
ENDCLASS.
# Update step (will be executed after create)
update_source_code: |
CLASS <YOUR_CLASS_NAME> DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS:
constructor,
get_message RETURNING VALUE(rv_message) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CLASS_NAME> IMPLEMENTATION.
METHOD constructor.
" Updated initialization logic
WRITE: / 'Class instance created - UPDATED'.
ENDMETHOD.
METHOD get_message.
rv_message = 'Updated message from MCP test'.
ENDMETHOD.
ENDCLASS.
update_activate: true
# Delete step (will be executed after update)
delete_after_test: true
delete_object_type: "CLAS/OC"
- name: "builder_class"
enabled: false
description: "High-level test for ClassHighHandlers and ClassLocalIncludesHandlers: create → update → get → delete class with local includes"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
class_name: "<YOUR_CLASS_NAME>"
description: "Test ABAP Class created via MCP ABAP ADT for high-level handlers"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
superclass: ""
final: false
abstract: false
create_protected: false
source_code: |
CLASS <YOUR_CLASS_NAME> DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: constructor.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CLASS_NAME> IMPLEMENTATION.
METHOD constructor.
" Initialization logic here
WRITE: / 'Class instance created'.
ENDMETHOD.
ENDCLASS.
# Update step (will be executed after create)
update_source_code: |
CLASS <YOUR_CLASS_NAME> DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS:
constructor,
get_message RETURNING VALUE(rv_message) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CLASS_NAME> IMPLEMENTATION.
METHOD constructor.
" Updated initialization logic
WRITE: / 'Class instance created - UPDATED'.
ENDMETHOD.
METHOD get_message.
rv_message = 'Updated message from MCP test'.
ENDMETHOD.
ENDCLASS.
update_activate: true
# Parameters group for ClassLocalIncludesHandlers test
params_groups:
builder_class:
class_name: "<YOUR_CLASS_NAME>"
description: "Test ABAP Class for local includes handlers"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
source_code: |
CLASS <YOUR_CLASS_NAME> DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: constructor.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CLASS_NAME> IMPLEMENTATION.
METHOD constructor.
" Initialization logic here
WRITE: / 'Class instance created'.
ENDMETHOD.
ENDCLASS.
# Step 1.5: CrudClient Direct test (reference implementation - uses CrudClient without handlers)
# Class (Class - CrudClient Direct)
create_class_direct:
test_cases:
- name: "crud_direct"
enabled: false
description: "Class CrudClient direct test (reference implementation)"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
class_name: "<YOUR_CLASS_NAME>_DIRECT"
description: "Class CrudClient direct test"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
superclass: ""
final: true
source_code: |
CLASS <YOUR_CLASS_NAME>_DIRECT DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS:
get_text RETURNING VALUE(rv_text) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CLASS_NAME>_DIRECT IMPLEMENTATION.
METHOD get_text.
rv_text = 'Hello from <YOUR_CLASS_NAME>_DIRECT'.
ENDMETHOD.
ENDCLASS.
cleanup_after: true
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Class (Class - Low-Level)
# Class (Class - Low-Level)
create_class_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
class_name: "<YOUR_CLASS_NAME>_LOW"
description: "Test ABAP Class created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
superclass: ""
final: false
abstract: false
create_protected: false
source_code: |
CLASS <YOUR_CLASS_NAME>_LOW DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: constructor.
ENDCLASS.
CLASS <YOUR_CLASS_NAME>_LOW IMPLEMENTATION.
METHOD constructor.
WRITE: / 'Class instance created'.
ENDMETHOD.
ENDCLASS.
# Update through low-level
update_source_code: |
CLASS <YOUR_CLASS_NAME>_LOW DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: get_message RETURNING VALUE(rv_message) TYPE string.
ENDCLASS.
CLASS <YOUR_CLASS_NAME>_LOW IMPLEMENTATION.
METHOD get_message.
rv_message = 'Updated via low-level handler'.
ENDMETHOD.
ENDCLASS.
- name: "test_class_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
class_name: "<YOUR_CLASS_NAME>_LOW"
description: "Test ABAP Class created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
superclass: ""
final: false
abstract: false
create_protected: false
# Update through low-level
update_source_code: |
CLASS <YOUR_CLASS_NAME>_LOW DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: get_message RETURNING VALUE(rv_message) TYPE string.
ENDCLASS.
CLASS <YOUR_CLASS_NAME>_LOW IMPLEMENTATION.
METHOD get_message.
rv_message = 'Updated via low-level handler'.
ENDMETHOD.
ENDCLASS.
# Delete through low-level
delete_after_test: true
delete_object_type: "CLAS/OC"
# Step 3: Read-only test (separate read-only handler)
# Data Element (Data Element)
# Data Element (Data Element)
create_data_element:
test_cases:
- name: "test_data_element_high"
enabled: true
description: "High-level test: create → update → delete data element"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
data_element_name: "<YOUR_DATA_ELEMENT_NAME>"
description: "Test data element created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
domain_name: "<YOUR_DOMAIN_NAME>" # Uses domain from GROUP 3
data_type: "CHAR"
length: 50
decimals: 0
short_label: "TestLbl"
medium_label: "Test Field"
field_label_long: "Test Field Long Label"
field_label_heading: "Test Heading"
# Update step
update_description: "Updated MCP data element"
update_field_label_short: "Upd Test"
update_field_label_medium: "Updated Test Field"
update_field_label_long: "Updated Test Field Long Label"
update_field_label_heading: "Updated Test Heading"
# Delete step
delete_after_test: true
delete_object_type: "DTEL"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Data Element (Data Element - Low-Level)
# Data Element (Data Element - Low-Level)
create_data_element_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
data_element_name: "<YOUR_DATA_ELEMENT_NAME>_LOW"
description: "Test data element created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
domain_name: "<YOUR_DOMAIN_NAME>"
data_type: "CHAR"
length: 50
decimals: 0
short_label: "TestLbl"
medium_label: "Test Field"
field_label_long: "Test Field Long Label"
field_label_heading: "Test Heading"
# Update through low-level
update_description: "Updated via low-level"
- name: "test_data_element_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
data_element_name: "<YOUR_DATA_ELEMENT_NAME>_LOW"
description: "Test data element created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
domain_name: "<YOUR_DOMAIN_NAME>"
data_type: "CHAR"
length: 50
decimals: 0
short_label: "TestLbl"
medium_label: "Test Field"
field_label_long: "Test Field Long Label"
field_label_heading: "Test Heading"
# Update through low-level
update_description: "Updated via low-level"
# Delete through low-level
delete_after_test: true
delete_object_type: "DTEL"
# Step 3: Read-only test (separate read-only handler)
# Domain (Domain)
# Domain (Domain)
create_domain:
test_cases:
- name: "test_domain_high"
enabled: true
description: "High-level test: create → update → delete domain"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
domain_name: "<YOUR_DOMAIN_NAME>"
description: "Test domain created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
datatype: "CHAR"
length: 50
decimals: 0
lowercase: false
sign_exists: false
# Update step
update_description: "Updated test domain description"
update_length: 60
# Delete step
delete_after_test: true
delete_object_type: "DOMA"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Domain (Domain - Low-Level)
# Domain (Domain - Low-Level)
create_domain_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
domain_name: "<YOUR_DOMAIN_NAME>_LOW"
description: "Test domain created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
datatype: "CHAR"
length: 50
decimals: 0
lowercase: false
sign_exists: false
properties:
description: "Test domain for low-level handler"
datatype: "CHAR"
length: 50
# Update through low-level
update_description: "Updated via low-level"
update_length: 60
- name: "test_domain_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
domain_name: "<YOUR_DOMAIN_NAME>_LOW"
description: "Test domain created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
datatype: "CHAR"
length: 50
decimals: 0
lowercase: false
sign_exists: false
# Update through low-level
update_description: "Updated via low-level"
update_length: 60
# Delete through low-level
delete_after_test: true
delete_object_type: "DOMA"
# Step 3: Read-only test (separate read-only handler)
# Function Group & Function Module (High & Low Level Tests)
create_function:
test_cases:
- name: "full_workflow"
enabled: true
description: "Complete function group and function module workflow for high and low level tests"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Function Group parameters
function_group_name: "<YOUR_FUNCTION_GROUP_NAME>"
function_group_description: "Function group for workflow tests"
# ⚠️ DISABLED: update_description causes lock conflict after create
# update_function_group_description: "Function group for workflow tests (updated)"
# Function Module parameters
function_module_name: "<YOUR_FUNCTION_MODULE_NAME>"
function_module_description: "Function module for workflow tests"
source_code: |
FUNCTION <YOUR_FUNCTION_MODULE_NAME_LOWERCASE>.
IMPORTING
VALUE(IV_PARAM) TYPE STRING
EXPORTING
VALUE(EV_RESULT) TYPE STRING.
ev_result = |Result: { iv_param }|.
ENDFUNCTION.
update_source_code: |
FUNCTION <YOUR_FUNCTION_MODULE_NAME_LOWERCASE>.
IMPORTING
VALUE(IV_PARAM) TYPE STRING
EXPORTING
VALUE(EV_RESULT) TYPE STRING.
ev_result = |Updated Result: { iv_param }|.
ENDFUNCTION.
# Common parameters
# package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>"
# Function Group (Function Group)
# Function Group (Function Group)
create_function_group:
test_cases:
- name: "test_function_group_high"
enabled: true
description: "High-level test: create → update → delete function group"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
function_group_name: "<YOUR_FUNCTION_GROUP_NAME>"
description: "Test function group created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Not needed for local packages (ZLOCAL)
# Update step (update description)
update_description: "Updated test function group description"
# Delete step
delete_after_test: true
delete_object_type: "FUGR"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Function Group (Function Group - Low-Level)
# Function Group (Function Group - Low-Level)
create_function_group_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
function_group_name: "<YOUR_FUNCTION_GROUP_NAME>_LOW"
description: "Test function group created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# Update through low-level
update_description: "Updated via low-level"
- name: "test_function_group_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
function_group_name: "<YOUR_FUNCTION_GROUP_NAME>_LOW"
description: "Test function group created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# Update through low-level
update_description: "Updated via low-level"
# Delete through low-level
delete_after_test: true
delete_object_type: "FUGR"
# Step 3: Read-only test (separate read-only handler)
# Function Module (Function Module)
# Function Module (Function Module)
create_function_module:
test_cases:
- name: "test_function_module"
enabled: true
description: "Create test function module (uses function group from GROUP 9)"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
function_module_name: "<YOUR_FUNCTION_MODULE_NAME>"
function_group_name: "<YOUR_FUNCTION_GROUP_NAME>"
description: "Test function module created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Not needed for local packages (ZLOCAL)
source_code: |
FUNCTION <YOUR_FUNCTION_MODULE_NAME_LOWERCASE>
IMPORTING
VALUE(IV_PARAM) TYPE STRING
EXPORTING
VALUE(EV_RESULT) TYPE STRING.
ev_result = |Result: { iv_param }|.
ENDFUNCTION.
# Update step
update_source_code: |
FUNCTION <YOUR_FUNCTION_MODULE_NAME_LOWERCASE>
IMPORTING
VALUE(IV_PARAM) TYPE STRING
VALUE(IV_OPTIONAL) TYPE STRING OPTIONAL
EXPORTING
VALUE(EV_RESULT) TYPE STRING
VALUE(EV_STATUS) TYPE STRING.
ev_result = |Result: { iv_param }|.
ev_status = |Status: OK|.
ENDFUNCTION.
update_activate: true
# Delete step
delete_after_test: true
delete_object_type: "FUGR/FF"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Step 3: Read-only test (separate read-only handler)
# Interface (Interface)
# Interface (Interface)
create_interface:
test_cases:
- name: "test_interface_high"
enabled: true
description: "High-level test: create → update → delete interface"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
interface_name: "<YOUR_INTERFACE_NAME>"
description: "Test interface created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
source_code: |
INTERFACE <YOUR_INTERFACE_NAME>
PUBLIC.
METHODS test_method
IMPORTING
iv_param TYPE string
RETURNING
VALUE(rv_result) TYPE string.
ENDINTERFACE.
# Update step
update_source_code: |
INTERFACE <YOUR_INTERFACE_NAME>
PUBLIC.
METHODS:
test_method
IMPORTING
iv_param TYPE string
RETURNING
VALUE(rv_result) TYPE string,
get_status RETURNING VALUE(rv_status) TYPE string.
ENDINTERFACE.
update_activate: true
# Delete step
delete_after_test: true
delete_object_type: "INTF/OI"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Interface (Interface - Low-Level)
# Interface (Interface - Low-Level)
create_interface_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
interface_name: "<YOUR_INTERFACE_NAME>_LOW"
description: "Test ABAP Interface created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
source_code: |
INTERFACE <YOUR_INTERFACE_NAME>_LOW PUBLIC.
METHODS: test_method RETURNING VALUE(rv_result) TYPE string.
ENDINTERFACE.
# Update through low-level
update_source_code: |
INTERFACE <YOUR_INTERFACE_NAME>_LOW PUBLIC.
METHODS: get_status RETURNING VALUE(rv_status) TYPE string.
ENDINTERFACE.
- name: "test_interface_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
interface_name: "<YOUR_INTERFACE_NAME>_LOW"
description: "Test ABAP Interface created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
# Update through low-level
update_source_code: |
INTERFACE <YOUR_INTERFACE_NAME>_LOW PUBLIC.
METHODS: get_status RETURNING VALUE(rv_status) TYPE string.
ENDINTERFACE.
# Delete through low-level
delete_after_test: true
delete_object_type: "INTF/OI"
# Step 3: Read-only test (separate read-only handler)
# Metadata Extension (Metadata Extension - Low-Level)
# Metadata Extension (Metadata Extension - Low-Level)
create_metadata_extension_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
name: "<YOUR_METADATA_EXTENSION_NAME>"
description: "Test metadata extension created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
# Example of complete metadata extension source code:
# @Metadata.layer: #CUSTOMER
# annotate entity ZOK_C_CDS_TEST with {
# @EndUserText.label: 'Field 1 Label'
# @UI.identification: [{ position: 10 }]
# Fld1;
# @EndUserText.label: 'Field 2 Label'
# @UI.lineItem: [{ position: 20 }]
# Fld2;
# @EndUserText.label: 'Field 3 Label'
# @UI.lineItem: [{ position: 30 }]
# Fld3;
# @EndUserText.label: 'Child Items'
# @UI.lineItem: [{ position: 40 }]
# @UI.selectionField: [{ position: 1 }]
# _association_name;
# }
source_code: |
@Metadata.layer: #CUSTOMER
annotate entity <YOUR_ENTITY_NAME> with {
@EndUserText.label: 'Field 1 Label'
@UI.identification: [{ position: 10 }]
<YOUR_FIELD_1>;
@EndUserText.label: 'Field 2 Label'
@UI.lineItem: [{ position: 20 }]
<YOUR_FIELD_2>;
@EndUserText.label: 'Field 3 Label'
@UI.lineItem: [{ position: 30 }]
<YOUR_FIELD_3>;
}
# ============================================================================
# BEHAVIOR IMPLEMENTATION - Low-Level Handler
# ============================================================================
# Package (Package)
# Package (Package)
create_package:
test_cases:
- name: "test_package_high"
enabled: true
description: "High-level test: create → update → delete package"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
package_name: "<YOUR_PACKAGE_NAME>" # Package where test objects are added (existing package)
description: "Test package created via MCP for test suite"
# super_package not needed for high-level handler
package_type: "development"
responsible: "<YOUR_RESPONSIBLE_USER>" # ⚠️ UPDATE WITH YOUR USER ID (e.g., CB9980002377)
# software_component: "<YOUR_SOFTWARE_COMPONENT>" # Optional - omit for local packages
# transport_layer: "<YOUR_TRANSPORT_LAYER>" # Optional - omit for local packages
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional - omit for local packages
application_component: ""
# Update step (update description)
update_description: "Updated test package description"
# Delete step
delete_after_test: true
delete_object_type: "DEVC/K"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Package (Package - Low-Level)
# Package (Package - Low-Level)
create_package_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# package_name: "<YOUR_SUPER_PACKAGE>" # Parent package (super_package) - optional, uses default_package from environment if not specified
test_package: "<YOUR_PACKAGE_NAME>_LOW" # Package to create
description: "Test package created via low-level MCP handler"
updated_description: "Test package created via low-level MCP handler (UPDATED)"
package_type: "development"
software_component: "ZLOCAL" # Use your system's software component
# responsible: "<YOUR_RESPONSIBLE_USER>" # Optional
# application_component: "" # Optional
operation_delays:
create: 5000
update: 3000
unlock: 5000
delete: 20000
delete_retry: 20000
- name: "test_package_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
package_name: "<YOUR_SUPER_PACKAGE>" # Parent package (super_package) - use your system's local package (e.g., ZLOCAL for cloud, $TMP for on-premise)
test_package: "<YOUR_PACKAGE_NAME>_LOW" # Package to create
description: "Test package created via low-level MCP handler"
package_type: "development"
responsible: "<YOUR_RESPONSIBLE_USER>"
application_component: ""
# Update through low-level
update_description: "Updated via low-level"
# Delete through low-level
delete_after_test: true
delete_object_type: "DEVC/K"
# Step 3: Read-only test (separate read-only handler)
# Program (Program)
# Program (Program)
create_program:
test_cases:
- name: "test_program_high"
enabled: true
description: "High-level test: create → update → delete program"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
program_name: "<YOUR_PROGRAM_NAME>"
description: "Test ABAP Program created via MCP ABAP ADT"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages (ZLOCAL)
program_type: "1"
application: "*"
source_code: |
*&---------------------------------------------------------------------*
*& Report <YOUR_PROGRAM_NAME>
*& Test ABAP Program created via MCP ABAP ADT
*&---------------------------------------------------------------------*
REPORT <YOUR_PROGRAM_NAME>.
START-OF-SELECTION.
WRITE: / 'Program <YOUR_PROGRAM_NAME> executed successfully.'.
WRITE: / 'Created via MCP ABAP ADT API.'.
# Update step
update_source_code: |
*&---------------------------------------------------------------------*
*& Report <YOUR_PROGRAM_NAME>
*& UPDATED Test ABAP Program via MCP ABAP ADT
*&---------------------------------------------------------------------*
REPORT <YOUR_PROGRAM_NAME>.
START-OF-SELECTION.
WRITE: / 'Program <YOUR_PROGRAM_NAME> executed successfully - UPDATED'.
WRITE: / 'Updated via MCP ABAP ADT API.'.
WRITE: / 'Modification date:', sy-datum.
update_activate: true
# Delete step
delete_after_test: true
delete_object_type: "PROG/P"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Program (Program - Low-Level)
# Program (Program - Low-Level)
create_program_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
program_name: "<YOUR_PROGRAM_NAME>_LOW"
description: "Test ABAP Program created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
program_type: "1"
source_code: |
*&---------------------------------------------------------------------*
*& Report <YOUR_PROGRAM_NAME>_LOW
*&---------------------------------------------------------------------*
REPORT <YOUR_PROGRAM_NAME>_LOW.
START-OF-SELECTION.
WRITE: / 'Program created via low-level handler'.
# Update through low-level
update_source_code: |
REPORT <YOUR_PROGRAM_NAME>_LOW.
START-OF-SELECTION.
WRITE: / 'Updated via low-level handler'.
- name: "test_program_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
program_name: "<YOUR_PROGRAM_NAME>_LOW"
description: "Test ABAP Program created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
program_type: "1"
# Update through low-level
update_source_code: |
REPORT <YOUR_PROGRAM_NAME>_LOW.
START-OF-SELECTION.
WRITE: / 'Updated via low-level handler'.
# Delete through low-level
delete_after_test: true
delete_object_type: "PROG/P"
# Step 3: Read-only test (separate read-only handler)
# Structure (Structure)
# Structure (Structure)
create_structure:
test_cases:
- name: "test_structure_high"
enabled: false
description: "High-level test: create → update → delete structure"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
structure_name: "<YOUR_STRUCTURE_NAME>"
description: "Test structure created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Not needed for local packages (ZLOCAL)
fields:
- name: "FIELD1"
description: "First field"
data_type: "CHAR"
length: 10
- name: "FIELD2"
description: "Second field"
data_type: "CHAR"
length: 20
# Update step (update fields)
update_fields:
- name: "FIELD1"
description: "First field updated"
data_type: "CHAR"
length: 15
- name: "FIELD2"
description: "Second field updated"
data_type: "CHAR"
length: 25
- name: "FIELD3"
description: "Third field added"
data_type: "CHAR"
length: 30
# Delete step
delete_after_test: true
delete_object_type: "TTYP/ST"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Structure (Structure - Low-Level)
# Structure (Structure - Low-Level)
create_structure_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
structure_name: "<YOUR_STRUCTURE_NAME>_LOW"
description: "Test structure created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
ddl_code: |
@EndUserText.label: 'Test structure created via low-level MCP handler'
@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE
define structure <YOUR_STRUCTURE_NAME>_LOW {
field1 : abap.char(10);
field2 : abap.char(20);
}
# Update through low-level
updated_ddl_code: |
@EndUserText.label: 'Test structure created via low-level MCP handler'
@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE
define structure <YOUR_STRUCTURE_NAME>_LOW {
field1 : abap.char(10);
field2 : abap.char(20);
}
- name: "test_structure_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
structure_name: "<YOUR_STRUCTURE_NAME>_LOW"
description: "Test structure created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
# Update through low-level
update_description: "Updated via low-level"
# Delete through low-level
delete_after_test: true
delete_object_type: "TTYP/ST"
# Step 3: Read-only test (separate read-only handler)
# Table (Table)
# Table (Table)
create_table:
test_cases:
- name: "test_table_high"
enabled: false
description: "High-level test: create → update → delete table"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
table_name: "<YOUR_TABLE_NAME>"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Not needed for local packages (ZLOCAL)
ddl_code: |
@EndUserText.label : 'Test Table'
@AbapCatalog.tableCategory : #TRANSPARENT
define table <YOUR_TABLE_NAME_LOWER> {
key client : abap.clnt not null;
key id : abap.char(10);
name : abap.char(255);
created_at : abap.dats;
}
# Update step (update DDL code)
updated_ddl_code: |
@EndUserText.label : 'Test Table Updated'
@AbapCatalog.tableCategory : #TRANSPARENT
define table <YOUR_TABLE_NAME_LOWER> {
key client : abap.clnt not null;
key id : abap.char(10);
name : abap.char(255);
created_at : abap.dats;
updated_at : abap.dats;
}
# Delete step
delete_after_test: true
delete_object_type: "TABL/DT"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# Table (Table - Low-Level)
# Table (Table - Low-Level)
create_table_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
table_name: "<YOUR_TABLE_NAME>_LOW"
description: "Test table created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
delivery_class: "A"
data_browser: "X"
data_maintenance: "X"
ddl_code: |
@EndUserText.label : 'Test Table Low'
@AbapCatalog.tableCategory : #TRANSPARENT
define table <YOUR_TABLE_NAME_LOWER>_LOW {
key client : abap.clnt not null;
key id : abap.char(10);
name : abap.char(255);
}
# Update through low-level
updated_ddl_code: |
@EndUserText.label : 'Test Table Low Updated'
@AbapCatalog.tableCategory : #TRANSPARENT
define table <YOUR_TABLE_NAME_LOWER>_LOW {
key client : abap.clnt not null;
key id : abap.char(10);
name : abap.char(255);
updated_at : abap.dats;
}
- name: "test_table_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
table_name: "<YOUR_TABLE_NAME>_LOW"
description: "Test table created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
delivery_class: "A"
data_browser: "X"
data_maintenance: "X"
# Update through low-level
update_description: "Updated via low-level"
# Delete through low-level
delete_after_test: true
delete_object_type: "TABL/DT"
# Step 3: Read-only test (separate read-only handler)
# Transport (Transport)
# Transport (Transport)
create_transport:
test_cases:
- name: "workbench_transport"
enabled: true
description: "Create a workbench transport request (required for package and transportable objects)"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
transport_type: "workbench"
description: "Test transport created via MCP for test suite"
owner: "<YOUR_RESPONSIBLE_USER>" # ⚠️ UPDATE WITH YOUR USERNAME (e.g., CB9980002377)
# target_system: "<YOUR_TARGET>" # Optional: if not provided or empty, uses "LOCAL"
# Step 2: Get transport (read created transport)
# View (View)
# View (View)
create_view:
test_cases:
- name: "test_view_high"
enabled: false
description: "High-level test: create → update → delete view"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
# Create step
view_name: "<YOUR_VIEW_NAME>"
description: "Test CDS view created via MCP"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Not needed for local packages (ZLOCAL)
ddl_source: |
@AbapCatalog.sqlViewName: '<YOUR_VIEW_NAME>'
@EndUserText.label: 'Test CDS View'
define view <YOUR_VIEW_NAME>
as select from mara
{
matnr,
mbrsh,
mtart
}
# Update step
update_ddl_source: |
@AbapCatalog.sqlViewName: '<YOUR_VIEW_NAME>'
@EndUserText.label: 'Test CDS View Updated'
define view <YOUR_VIEW_NAME>
as select from mara
{
matnr,
mbrsh,
mtart,
meins
}
update_activate: true
# Delete step
delete_after_test: true
delete_object_type: "DDLS/DF"
# Step 2: Low-level flow test (create → update → delete through low-level handlers)
# View (View - Low-Level)
# View (View - Low-Level)
create_view_low:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test: Validate → Create → Lock → Update → Unlock → Activate"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
view_name: "<YOUR_VIEW_NAME>_LOW"
description: "Test CDS view created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
ddl_source: |
@AbapCatalog.sqlViewName: '<YOUR_VIEW_NAME>_LOW'
@EndUserText.label: 'Test CDS View Low'
define view <YOUR_VIEW_NAME>_LOW
as select from mara
{
matnr,
mbrsh
}
# Update through low-level
update_ddl_source: |
@AbapCatalog.sqlViewName: '<YOUR_VIEW_NAME>_LOW'
@EndUserText.label: 'Test CDS View Low Updated'
define view <YOUR_VIEW_NAME>_LOW
as select from mara
{
matnr,
mbrsh,
mtart
}
- name: "test_view_low_flow"
enabled: false
description: "Low-level flow test: create → update → delete through low-level handlers"
params:
# skip_cleanup: true # Uncomment to keep object after test (overrides global cleanup_after)
view_name: "<YOUR_VIEW_NAME>_LOW"
description: "Test CDS view created via low-level MCP handler"
package_name: "<YOUR_PACKAGE_NAME>"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional: not needed for local packages
ddl_source: |
@AbapCatalog.sqlViewName: '<YOUR_VIEW_NAME>_LOW'
@EndUserText.label: 'Test CDS View Low'
define view <YOUR_VIEW_NAME>_LOW
as select from mara
{
matnr,
mbrsh
}
# Update through low-level
update_ddl_source: |
@AbapCatalog.sqlViewName: '<YOUR_VIEW_NAME>_LOW'
@EndUserText.label: 'Test CDS View Low Updated'
define view <YOUR_VIEW_NAME>_LOW
as select from mara
{
matnr,
mbrsh,
mtart
}
# Delete through low-level
delete_after_test: true
delete_object_type: "DDLS/DF"
# ============================================================================
# READ-ONLY HANDLER TESTS (for mcp-abap-adt integration tests)
# ============================================================================
# WhereUsed Read-Only Handler
whereused_readonly:
test_cases:
- name: "test_whereused"
enabled: true
description: "WhereUsed handler read-only tests"
params:
# Test objects for where-used analysis
test_class: "CL_ABAP_CHAR_UTILITIES" # Standard SAP class for testing
test_table: "SCARR" # Standard SAP table (Flight: Airlines)
# ============================================================================
# SYSTEM LOW-LEVEL HANDLERS
# ============================================================================
# System Low-Level Handlers (VirtualFolders, NodeStructure, ObjectStructure)
system_low_handlers:
test_cases:
- name: "test_system_low"
enabled: true
description: "System low-level handlers tests"
params:
# Test package for virtual folders and node structure
test_package: "<YOUR_TEST_PACKAGE>" # ⚠️ UPDATE: Replace with your test package name
# Test class for node structure and object structure
test_class: "<YOUR_TEST_CLASS>" # ⚠️ UPDATE: Replace with existing class name in your system
# Test program for node structure and object structure
test_program: "<YOUR_TEST_PROGRAM>" # ⚠️ UPDATE: Replace with existing program name in your system
# Test interface for node structure and object structure
test_interface: "<YOUR_TEST_INTERFACE>" # ⚠️ UPDATE: Replace with existing interface name in your system
# Test table for object structure
test_table: "<YOUR_TEST_TABLE>" # ⚠️ UPDATE: Replace with existing table name in your system
# Virtual folders search patterns
virtual_folders_pattern_default: "*" # Default search pattern (can be customized)
virtual_folders_pattern_custom: "Z*" # Custom search pattern for testing (can be customized)
# Virtual folders preselection facets
virtual_folders_facets: ["package", "group", "type"] # Facet order (can be customized)
# Node structure settings
node_structure_with_descriptions: true # Include short descriptions in node structure
# Object structure settings
object_structure_include_metadata: true # Include metadata in object structure
# ============================================================================
# SYSTEM HIGH-LEVEL HANDLERS
# ============================================================================
# System High-Level Handlers (PackageTree)
system_high_handlers:
test_cases:
- name: "test_system_high"
enabled: true
description: "System high-level handlers tests"
params:
# Test package for package tree
test_package: "<YOUR_TEST_PACKAGE>" # ⚠️ UPDATE: Replace with your test package name
# Package tree settings
package_tree_include_subpackages: true # Include subpackages in tree (can be customized)
package_tree_max_depth: 5 # Maximum depth for recursive package traversal (can be customized)
package_tree_include_descriptions: true # Include object descriptions in response (can be customized)
# Test package with subpackages (for testing recursive traversal)
test_package_with_subpackages: "<YOUR_TEST_PACKAGE_WITH_SUBPACKAGES>" # ⚠️ UPDATE: Replace with package that has subpackages
# Invalid package name for error handling tests
test_invalid_package: "INVALID_PACKAGE_XYZ_123" # Invalid package name for error tests (can be customized)
# ============================================================================
# CLASS UNIT TEST - Low-Level and High-Level Handlers
# ============================================================================
# Class Unit Test (Low-Level and High-Level)
class_unit_test:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test for unit test handlers: Lock → Update → Unlock → Activate → Run → GetStatus → GetResult (low-level) or RunUnitTest → GetUnitTest (high-level)"
params:
# Container class that contains the test class
container_class_name: "<YOUR_CONTAINER_CLASS_NAME>"
# Test class name inside the container class's testclasses include
test_class_name: "<YOUR_TEST_CLASS_NAME>"
# Optional: test class source code (if not provided, default test class will be used)
test_class_source: |
CLASS <YOUR_TEST_CLASS_NAME> DEFINITION FINAL
FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PRIVATE SECTION.
METHODS test_method FOR TESTING.
ENDCLASS.
CLASS <YOUR_TEST_CLASS_NAME> IMPLEMENTATION.
METHOD test_method.
cl_abap_unit_assert=>assert_true( abap_true ).
ENDMETHOD.
ENDCLASS.
# For high-level handlers (RunUnitTest, GetUnitTest)
test_class:
container_class: "<YOUR_CONTAINER_CLASS_NAME>"
name: "<YOUR_TEST_CLASS_NAME>"
run_unit_test: true # Enable unit test run for high-level handlers
# ============================================================================
# CDS UNIT TEST - High-Level Handlers
# ============================================================================
cds_unit_test:
test_cases:
- name: "full_workflow"
enabled: false
description: "Full workflow test for CDS unit test handlers: Create → Update → Run → Get → Delete"
params:
class_name: "<YOUR_CDS_UNIT_TEST_CLASS_NAME>"
test_class_name: "<YOUR_CDS_TEST_CLASS_NAME>"
package_name: "<YOUR_PACKAGE_NAME>"
cds_view_name: "<YOUR_CDS_VIEW_NAME>"
description: "CDS unit test class"
# transport_request: "<YOUR_TRANSPORT_REQUEST>" # Optional for local packages
class_template: |
CLASS <YOUR_CDS_UNIT_TEST_CLASS_NAME> DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS <YOUR_CDS_UNIT_TEST_CLASS_NAME> IMPLEMENTATION.
ENDCLASS.
test_class_source: |
CLASS <YOUR_CDS_TEST_CLASS_NAME> DEFINITION FINAL
FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PRIVATE SECTION.
METHODS test_method FOR TESTING.
ENDCLASS.
CLASS <YOUR_CDS_TEST_CLASS_NAME> IMPLEMENTATION.
METHOD test_method.
cl_abap_unit_assert=>assert_true( abap_true ).
ENDMETHOD.
ENDCLASS.
update_test_class_source: |
CLASS <YOUR_CDS_TEST_CLASS_NAME> DEFINITION FINAL
FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PRIVATE SECTION.
METHODS test_method FOR TESTING.
ENDCLASS.
CLASS <YOUR_CDS_TEST_CLASS_NAME> IMPLEMENTATION.
METHOD test_method.
cl_abap_unit_assert=>assert_true( abap_true ).
ENDMETHOD.
ENDCLASS.
# Step 3: Read-only test (separate read-only handler)