list_ci_test_results
Retrieve and filter test results from App Store Connect CI/CD builds to analyze test status, duration, and failures for iOS/macOS development workflows.
Instructions
List test results from a build run or build action
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buildRunId | No | The ID of the build run to list test results for (provide either buildRunId or buildActionId) | |
| buildActionId | No | The ID of the build action to list test results for (provide either buildRunId or buildActionId) | |
| limit | No | Maximum number of test results to return (default: 100, max: 200) | |
| sort | No | Sort order for the results | |
| filter | No | ||
| include | No | Related resources to include in the response | |
| fields | No |
Implementation Reference
- src/handlers/workflows.ts:182-219 (handler)The handler function listTestResults that executes the core logic: constructs API parameters and calls the App Store Connect API endpoint for CI test results.async listTestResults(args: { buildRunId?: string; buildActionId?: string; limit?: number; sort?: CiTestResultSortOptions; filter?: CiTestResultFilters; fields?: { ciTestResults?: CiTestResultFieldOptions[]; }; include?: CiTestResultIncludeOptions[]; }): Promise<CiTestResultsResponse> { const { buildRunId, buildActionId, limit = 100, sort, filter, fields, include } = args; if (!buildRunId && !buildActionId) { throw new Error('Either buildRunId or buildActionId must be provided'); } const params: Record<string, any> = { limit: sanitizeLimit(limit) }; if (sort) { params.sort = sort; } if (include?.length) { params.include = include.join(','); } Object.assign(params, buildFilterParams(filter)); Object.assign(params, buildFieldParams(fields)); const endpoint = buildRunId ? `/ciBuildRuns/${buildRunId}/testResults` : `/ciBuildActions/${buildActionId}/testResults`; return this.client.get<CiTestResultsResponse>(endpoint, params); }
- src/index.ts:1150-1215 (schema)Tool schema definition including name, description, and detailed inputSchema with parameters for filtering, sorting, and including related data.name: "list_ci_test_results", description: "List test results from a build run or build action", inputSchema: { type: "object", properties: { buildRunId: { type: "string", description: "The ID of the build run to list test results for (provide either buildRunId or buildActionId)" }, buildActionId: { type: "string", description: "The ID of the build action to list test results for (provide either buildRunId or buildActionId)" }, limit: { type: "number", description: "Maximum number of test results to return (default: 100, max: 200)", minimum: 1, maximum: 200 }, sort: { type: "string", description: "Sort order for the results", enum: ["className", "-className", "name", "-name", "status", "-status", "duration", "-duration"] }, filter: { type: "object", properties: { status: { type: "string", enum: ["SUCCESS", "FAILURE", "SKIPPED"], description: "Filter by test status" }, className: { type: "string", description: "Filter by test class name" }, name: { type: "string", description: "Filter by test name" } } }, include: { type: "array", items: { type: "string", enum: ["buildAction", "buildRun"] }, description: "Related resources to include in the response" }, fields: { type: "object", properties: { ciTestResults: { type: "array", items: { type: "string", enum: ["className", "name", "status", "fileLocation", "failureMessage", "duration"] }, description: "Fields to include for each test result" } } } } } }
- src/index.ts:1446-1448 (registration)Registers the tool by mapping the 'list_ci_test_results' name in the switch statement to call the workflowHandlers.listTestResults method.case "list_ci_test_results": const testResultsData = await this.workflowHandlers.listTestResults(args as any); return formatResponse(testResultsData);
- src/types/workflows.ts:403-446 (schema)TypeScript interfaces and types defining the CiTestResultsResponse structure, filters, sort options, fields, and includes used by the tool.export interface CiTestResultsResponse { data: CiTestResult[]; included?: Array<{ id: string; type: "ciBuildActions" | "ciBuildRuns"; attributes: any; }>; links?: { self: string; first?: string; next?: string; }; meta?: { paging: { total: number; limit: number; }; }; } export interface CiTestResultFilters { status?: "SUCCESS" | "FAILURE" | "SKIPPED"; className?: string; name?: string; } export type CiTestResultSortOptions = | "className" | "-className" | "name" | "-name" | "status" | "-status" | "duration" | "-duration"; export type CiTestResultFieldOptions = | "className" | "name" | "status" | "fileLocation" | "failureMessage" | "duration"; export type CiTestResultIncludeOptions = | "buildAction" | "buildRun";