test_reporting_connection
Verify connectivity to Zebrunner Reporting API using updated authentication methods to ensure reporting data can be transmitted successfully.
Instructions
🔌 Test connection to Zebrunner Reporting API with new authentication
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server-with-reporting.ts:229-255 (registration)Registers the 'test_reporting_connection' MCP tool with an inline handler that calls reportingClient.testConnection() and formats the result as MCP content.server.tool( "test_reporting_connection", "🔌 Test connection to Zebrunner Reporting API with new authentication", {}, async () => { try { const result = await reportingClient.testConnection(); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) } ] }; } catch (error: any) { return { content: [ { type: "text" as const, text: `Reporting API Connection failed: ${error.message}` } ] }; } } );
- src/api/reporting-client.ts:223-243 (helper)Core implementation of connection test in ZebrunnerReportingClient: authenticates via this.authenticate() and returns success/failure status with details.async testConnection(): Promise<{ success: boolean; message: string; details?: any }> { try { const bearerToken = await this.authenticate(); return { success: true, message: 'Connection successful to Zebrunner Reporting API', details: { baseUrl: this.config.baseUrl, tokenLength: bearerToken.length, expiresAt: this.tokenExpiresAt } }; } catch (error) { return { success: false, message: `Connection failed: ${error instanceof Error ? error.message : 'Unknown error'}`, details: { error } }; } }