/** * Test Service - ADO Test Management API * * Uses _apis/test/ (not _apis/testplan/) to avoid Azure Test Plans license requirement. * All runs are created with isAutomated: true to bypass the Test Plan requirement. */ import type { AzureDevOpsClient } from '../azure-devops-client.js'; import type { WorkItemService } from './work-item-service.js'; export declare class TestService { private readonly client; private readonly workItem; constructor(client: AzureDevOpsClient, workItem: WorkItemService); /** * Create a test run. Always sets isAutomated: true (no Test Plan needed). * Optionally links test cases to the run via hyperlinks. */ createTestRun(project: string, name: string, options?: { comment?: string; testCaseIds?: number[]; buildId?: number; }): Promise<{ runId: number; name: string; url: string; webAccessUrl: string; }>; /** * Add test results to an existing run. */ addTestResults(project: string, runId: number, results: Array<{ title: string; outcome: string; comment?: string; testCaseId?: number; automatedTestName?: string; }>): Promise<{ count: number; results: Array<{ id: number; title: string; outcome: string; }>; }>; /** * Mark a test run as completed. */ completeTestRun(project: string, runId: number, comment?: string): Promise<{ runId: number; state: string; totalTests: number; passedTests: number; failedTests: number; url: string; }>; /** * List test runs, optionally filtered by state and date. */ getTestRuns(project: string, options?: { state?: string; maxRuns?: number; fromDate?: string; }): Promise>; /** * Get results for a specific test run. */ getTestRunResults(project: string, runId: number, outcome?: string): Promise>; /** * Get test run history for a specific test case. * Queries recent runs and filters results by testCase.id. */ getTestCaseHistory(project: string, testCaseId: number): Promise>; /** * Link a test case to a user story (TestedBy) and/or a test run (Hyperlink). * Idempotent — checks existing relations before adding. */ linkTestCase(project: string, testCaseId: number, options: { storyId?: number; runId?: number; runSummary?: string; }): Promise<{ linked: string[]; }>; } //# sourceMappingURL=test-service.d.ts.map