UNPKG

@ryancardin/azuredevops-mcp-server

Version:

MCP server for Azure DevOps integration - provides seamless access to work items, repositories, projects, boards, and sprints

157 lines 6.82 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TestingCapabilitiesToolMethods = exports.TestingCapabilitiesTools = void 0; const TestingCapabilitiesService_1 = require("../Services/TestingCapabilitiesService"); const Common_1 = require("../Interfaces/Common"); const getClassMethods_1 = __importDefault(require("../utils/getClassMethods")); class TestingCapabilitiesTools { constructor(config) { this.service = new TestingCapabilitiesService_1.TestingCapabilitiesService(config); } async runAutomatedTests(params) { try { const result = await this.service.runAutomatedTests(params); return (0, Common_1.formatMcpResponse)(result, "Automated tests started"); } catch (error) { console.error('Error running automated tests:', error); return (0, Common_1.formatErrorResponse)(error); } } async getTestAutomationStatus(params) { try { const result = await this.service.getTestAutomationStatus(params); return (0, Common_1.formatMcpResponse)(result, `Test run ${params.testRunId} status`); } catch (error) { console.error('Error getting test status:', error); return (0, Common_1.formatErrorResponse)(error); } } async configureTestAgents(params) { try { const result = await this.service.configureTestAgents(params); return (0, Common_1.formatMcpResponse)(result, `Test agent ${params.agentName} configured`); } catch (error) { console.error('Error configuring test agent:', error); return (0, Common_1.formatErrorResponse)(error); } } async createTestDataGenerator(params) { try { const result = await this.service.createTestDataGenerator(params); return (0, Common_1.formatMcpResponse)(result, `Test data generator created: ${params.name}`); } catch (error) { console.error('Error creating test data generator:', error); return (0, Common_1.formatErrorResponse)(error); } } async manageTestEnvironments(params) { try { const result = await this.service.manageTestEnvironments(params); return (0, Common_1.formatMcpResponse)(result, `Test environment ${params.environmentName} ${params.action}d`); } catch (error) { console.error('Error managing test environment:', error); return (0, Common_1.formatErrorResponse)(error); } } async getTestFlakiness(params) { try { const result = await this.service.getTestFlakiness(params); return (0, Common_1.formatMcpResponse)(result, "Test flakiness analysis"); } catch (error) { console.error('Error analyzing test flakiness:', error); return (0, Common_1.formatErrorResponse)(error); } } async getTestGapAnalysis(params) { try { const result = await this.service.getTestGapAnalysis(params); return (0, Common_1.formatMcpResponse)(result, "Test gap analysis"); } catch (error) { console.error('Error performing test gap analysis:', error); return (0, Common_1.formatErrorResponse)(error); } } async runTestImpactAnalysis(params) { try { const result = await this.service.runTestImpactAnalysis(params); return (0, Common_1.formatMcpResponse)(result, `Test impact analysis for build ${params.buildId}`); } catch (error) { console.error('Error running test impact analysis:', error); return (0, Common_1.formatErrorResponse)(error); } } async getTestHealthDashboard(params) { try { const result = await this.service.getTestHealthDashboard(params); return (0, Common_1.formatMcpResponse)(result, "Test health dashboard"); } catch (error) { console.error('Error getting test health dashboard:', error); return (0, Common_1.formatErrorResponse)(error); } } async runTestOptimization(params) { try { const result = await this.service.runTestOptimization(params); return (0, Common_1.formatMcpResponse)(result, `Test optimization for test plan ${params.testPlanId}`); } catch (error) { console.error('Error running test optimization:', error); return (0, Common_1.formatErrorResponse)(error); } } async createExploratorySessions(params) { try { const result = await this.service.createExploratorySessions(params); return (0, Common_1.formatMcpResponse)(result, `Created exploratory session: ${params.title}`); } catch (error) { console.error('Error creating exploratory session:', error); return (0, Common_1.formatErrorResponse)(error); } } async recordExploratoryTestResults(params) { try { const result = await this.service.recordExploratoryTestResults(params); return (0, Common_1.formatMcpResponse)(result, `Recorded ${params.findings.length} findings for session ${params.sessionId}`); } catch (error) { console.error('Error recording exploratory test results:', error); return (0, Common_1.formatErrorResponse)(error); } } async convertFindingsToWorkItems(params) { try { const result = await this.service.convertFindingsToWorkItems(params); return (0, Common_1.formatMcpResponse)(result, `Converted findings to work items for session ${params.sessionId}`); } catch (error) { console.error('Error converting findings to work items:', error); return (0, Common_1.formatErrorResponse)(error); } } async getExploratoryTestStatistics(params) { try { const result = await this.service.getExploratoryTestStatistics(params); return (0, Common_1.formatMcpResponse)(result, "Exploratory testing statistics"); } catch (error) { console.error('Error getting exploratory test statistics:', error); return (0, Common_1.formatErrorResponse)(error); } } } exports.TestingCapabilitiesTools = TestingCapabilitiesTools; exports.TestingCapabilitiesToolMethods = (0, getClassMethods_1.default)(TestingCapabilitiesTools.prototype); //# sourceMappingURL=TestingCapabilitiesTools.js.map