Skip to main content
Glama
test-get-interface.js•1.86 kB
/** * Test script for GetInterface MCP tool * Tests reading interface information from SAP system * * Configuration is loaded from tests/test-config.yaml */ const { initializeTestEnvironment, getAllEnabledTestCases, printTestHeader, printTestParams, printTestResult } = require('./test-helper'); // Initialize test environment before importing handlers initializeTestEnvironment(); const { handleGetInterface } = require('../dist/handlers/handleGetInterface'); async function testGetInterface() { // Load all enabled test cases from YAML const testCases = getAllEnabledTestCases('get_interface'); console.log(`\nšŸ“‹ Found ${testCases.length} enabled test case(s)\n`); let passedTests = 0; let failedTests = 0; for (const testCase of testCases) { printTestHeader('GetInterface', testCase); printTestParams(testCase.params); try { console.log('\n--- Retrieving interface ---\n'); const result = await handleGetInterface(testCase.params); if (result.isError) { throw new Error(result.content[0]?.text || 'Unknown error'); } printTestResult(result, true); passedTests++; } catch (error) { console.error(`\nāŒ GetInterface test FAILED:`); console.error(error.message || error); failedTests++; } console.log('\n' + '='.repeat(60) + '\n'); } console.log('\nšŸ“Š Test Summary:'); console.log(` āœ… Passed: ${passedTests}`); console.log(` āŒ Failed: ${failedTests}`); console.log(` šŸ“ Total: ${testCases.length}\n`); if (failedTests === 0) { console.log('=== All tests completed successfully ===\n'); process.exit(0); } else { console.log('=== Some tests failed ===\n'); process.exit(1); } } testGetInterface().catch((error) => { console.error('Fatal error:', error); process.exit(1); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fr0ster/mcp-abap-adt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server