UNPKG

68 kBTypeScriptView Raw
1/// <reference types="node" />
2import basem = require('./ClientApiBases');
3import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
4import Contracts = require("./interfaces/TestInterfaces");
5import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
6export interface ITestResultsApi extends basem.ClientApiBase {
7 createTestIterationResultAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<Contracts.TestAttachmentReference>;
8 createTestResultAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<Contracts.TestAttachmentReference>;
9 createTestSubResultAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<Contracts.TestAttachmentReference>;
10 deleteTestResultAttachment(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<void>;
11 getTestIterationAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, iterationId: number): Promise<NodeJS.ReadableStream>;
12 getTestIterationAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, iterationId: number): Promise<NodeJS.ReadableStream>;
13 getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
14 getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<Contracts.TestAttachment[]>;
15 getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
16 getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
17 getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<Contracts.TestAttachment[]>;
18 getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
19 createTestRunAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number): Promise<Contracts.TestAttachmentReference>;
20 deleteTestRunAttachment(project: string, runId: number, attachmentId: number): Promise<void>;
21 getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
22 getTestRunAttachments(project: string, runId: number): Promise<Contracts.TestAttachment[]>;
23 getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
24 getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<Contracts.WorkItemReference[]>;
25 fetchSourceCodeCoverageReport(project: string, buildId: number): Promise<Contracts.SourceViewBuildCoverage[]>;
26 getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<Contracts.BuildCoverage[]>;
27 getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<Contracts.CodeCoverageSummary>;
28 updateCodeCoverageSummary(project: string, buildId: number, coverageData?: Contracts.CodeCoverageData): Promise<void>;
29 getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<Contracts.TestRunCoverage[]>;
30 addCustomFields(newFields: Contracts.CustomTestFieldDefinition[], project: string): Promise<Contracts.CustomTestFieldDefinition[]>;
31 queryCustomFields(project: string, scopeFilter: Contracts.CustomTestFieldScope): Promise<Contracts.CustomTestFieldDefinition[]>;
32 getFileLevelCodeCoverage(fileCoverageRequest: Contracts.FileCoverageRequest, project: string): Promise<NodeJS.ReadableStream>;
33 getFlakyTestResultsByBuildDefinitionId(project: string, buildDefinitionId: number, minBuildCreatedDate: Date): Promise<Contracts.TestCaseResult[]>;
34 getFlakyTestResultsByTestRun(project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
35 queryTestResultHistory(filter: Contracts.ResultsFilter, project: string): Promise<Contracts.TestResultHistory>;
36 getTestRunMessageLogs(project: string, runId: number): Promise<Contracts.TestMessageLogDetails[]>;
37 getTestPipelineMetrics(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, metricNames?: Contracts.Metrics[], groupByNode?: boolean): Promise<Contracts.PipelineTestMetrics>;
38 getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
39 getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
40 publishTestResultDocument(document: Contracts.TestResultDocument, project: string, runId: number): Promise<Contracts.TestResultDocument>;
41 getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.FieldDetailsForTestResults>>;
42 getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.FieldDetailsForTestResults>>;
43 queryTestResultsMetaData(testCaseReferenceIds: string[], project: string, detailsToInclude?: Contracts.ResultMetaDataDetails): Promise<Contracts.TestResultMetaData[]>;
44 updateTestResultsMetaData(testResultMetaDataUpdateInput: Contracts.TestResultMetaDataUpdateInput, project: string, testCaseReferenceId: number): Promise<Contracts.TestResultMetaData>;
45 getTestResultsByQuery(query: Contracts.TestResultsQuery, project: string): Promise<Contracts.TestResultsQuery>;
46 getTestResultsByQueryWiql(queryModel: Contracts.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise<Contracts.TestCaseResult[]>;
47 addTestResultsToTestRun(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
48 getTestResultById(project: string, runId: number, testResultId: number, detailsToInclude?: Contracts.ResultDetails): Promise<Contracts.TestCaseResult>;
49 getTestResults(project: string, runId: number, detailsToInclude?: Contracts.ResultDetails, skip?: number, top?: number, outcomes?: Contracts.TestOutcome[], newTestsOnly?: boolean): Promise<Contracts.TestCaseResult[]>;
50 updateTestResults(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
51 getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: Contracts.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.ShallowTestCaseResult>>;
52 getTestResultsByPipeline(customHeaders: any, project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, outcomes?: Contracts.TestOutcome[], top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.ShallowTestCaseResult>>;
53 getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: Contracts.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.ShallowTestCaseResult>>;
54 testResultsGroupDetails(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, shouldIncludeFailedAndAbortedResults?: boolean, queryGroupSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
55 queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: Contracts.BuildReference): Promise<Contracts.TestResultSummary>;
56 queryTestResultsReportForPipeline(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, includeFailureDetails?: boolean): Promise<Contracts.TestResultSummary>;
57 queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: Contracts.ReleaseReference): Promise<Contracts.TestResultSummary>;
58 queryTestResultsSummaryForReleases(releases: Contracts.ReleaseReference[], project: string): Promise<Contracts.TestResultSummary[]>;
59 queryTestSummaryByRequirement(resultsContext: Contracts.TestResultsContext, project: string, workItemIds?: number[]): Promise<Contracts.TestSummaryForWorkItem[]>;
60 queryResultTrendForBuild(filter: Contracts.TestResultTrendFilter, project: string): Promise<Contracts.AggregatedDataForResultTrend[]>;
61 queryResultTrendForRelease(filter: Contracts.TestResultTrendFilter, project: string): Promise<Contracts.AggregatedDataForResultTrend[]>;
62 createTestRun(testRun: Contracts.RunCreateModel, project: string): Promise<Contracts.TestRun>;
63 deleteTestRun(project: string, runId: number): Promise<void>;
64 getTestRunById(project: string, runId: number, includeDetails?: boolean, includeTags?: boolean): Promise<Contracts.TestRun>;
65 getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<Contracts.TestRun[]>;
66 queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: Contracts.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: Contracts.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.TestRun>>;
67 updateTestRun(runUpdateModel: Contracts.RunUpdateModel, project: string, runId: number): Promise<Contracts.TestRun>;
68 getTestRunSummaryByOutcome(project: string, runId: number): Promise<Contracts.TestRunStatistic>;
69 getTestResultsSettings(project: string, settingsType?: Contracts.TestResultsSettingsType): Promise<Contracts.TestResultsSettings>;
70 updatePipelinesTestSettings(testResultsUpdateSettings: Contracts.TestResultsUpdateSettings, project: string): Promise<Contracts.TestResultsSettings>;
71 getSimilarTestResults(customHeaders: any, project: string, runId: number, testResultId: number, testSubResultId: number, top?: number, continuationToken?: String): Promise<Contracts.TestCaseResult[]>;
72 getTestRunStatistics(project: string, runId: number): Promise<Contracts.TestRunStatistic>;
73 getCoverageStatusBadge(project: string, definition: string, branchName?: string, label?: string): Promise<string>;
74 getTestTagsForBuild(project: string, buildId: number): Promise<Contracts.TestTag[]>;
75 getTestTagsForRelease(project: string, releaseId: number, releaseEnvId: number): Promise<Contracts.TestTag[]>;
76 updateTestRunTags(testTagsUpdateModel: Contracts.TestTagsUpdateModel, project: string, runId: number): Promise<Contracts.TestTag[]>;
77 getTestTagSummaryForBuild(project: string, buildId: number): Promise<Contracts.TestTagSummary>;
78 getTestTagSummaryForRelease(project: string, releaseId: number, releaseEnvId: number): Promise<Contracts.TestTagSummary>;
79 createBuildAttachmentInLogStore(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, buildId: number): Promise<void>;
80 createTestRunLogStoreAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number): Promise<Contracts.TestLogStoreAttachmentReference>;
81 deleteTestRunLogStoreAttachment(project: string, runId: number, filename: string): Promise<void>;
82 getTestRunLogStoreAttachmentContent(project: string, runId: number, filename: string): Promise<NodeJS.ReadableStream>;
83 getTestRunLogStoreAttachments(project: string, runId: number): Promise<Contracts.TestLogStoreAttachment[]>;
84 getTestRunLogStoreAttachmentZip(project: string, runId: number, filename: string): Promise<NodeJS.ReadableStream>;
85 createFailureType(testResultFailureType: Contracts.TestResultFailureTypeRequestModel, project: string): Promise<Contracts.TestResultFailureType>;
86 deleteFailureType(project: string, failureTypeId: number): Promise<void>;
87 getFailureTypes(project: string): Promise<Contracts.TestResultFailureType[]>;
88 queryTestHistory(filter: Contracts.TestHistoryQuery, project: string): Promise<Contracts.TestHistoryQuery>;
89 getTestLogsForBuild(customHeaders: any, project: string, buildId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
90 getTestResultLogs(customHeaders: any, project: string, runId: number, resultId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
91 getTestSubResultLogs(customHeaders: any, project: string, runId: number, resultId: number, subResultId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
92 getTestRunLogs(customHeaders: any, project: string, runId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
93 getTestLogStoreEndpointDetailsForBuildLog(project: string, build: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
94 testLogStoreEndpointDetailsForBuild(project: string, buildId: number, testLogStoreOperationType: Contracts.TestLogStoreOperationType): Promise<Contracts.TestLogStoreEndpointDetails>;
95 getTestLogStoreEndpointDetailsForResultLog(project: string, runId: number, resultId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
96 getTestLogStoreEndpointDetailsForSubResultLog(project: string, runId: number, resultId: number, subResultId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
97 testLogStoreEndpointDetailsForResult(project: string, runId: number, resultId: number, subResultId: number, filePath: string, type: Contracts.TestLogType): Promise<Contracts.TestLogStoreEndpointDetails>;
98 getTestLogStoreEndpointDetailsForRunLog(project: string, runId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
99 testLogStoreEndpointDetailsForRun(project: string, runId: number, testLogStoreOperationType: Contracts.TestLogStoreOperationType, filePath?: string, type?: Contracts.TestLogType): Promise<Contracts.TestLogStoreEndpointDetails>;
100 getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>;
101 createTestSession(session: Contracts.TestResultsSession, project: string): Promise<number>;
102 getTestSession(project: string, buildId: number): Promise<Contracts.TestResultsSession[]>;
103 getTestSessionLayout(project: string, sessionId: string): Promise<any[]>;
104 createEnvironment(environments: Contracts.TestSessionEnvironment[], project: string): Promise<void>;
105 createNotification(notifications: Contracts.TestSessionNotification[], project: string, sessionId: number): Promise<number[]>;
106 getSessionNotifications(project: string, sessionId: number): Promise<Contracts.TestSessionNotification[]>;
107 addTestResultsToTestRunSession(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
108 getTestSessionResults(project: string, runId: number, detailsToInclude?: Contracts.ResultDetails, skip?: number, top?: number, outcomes?: Contracts.TestOutcome[], newTestsOnly?: boolean): Promise<Contracts.TestCaseResult[]>;
109 updateTestResultsToTestRunSession(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<number[]>;
110 createTestSettings(testSettings: Contracts.TestSettings, project: string): Promise<number>;
111 deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
112 getTestSettingsById(project: string, testSettingsId: number): Promise<Contracts.TestSettings>;
113 addWorkItemToTestLinks(workItemToTestLinks: Contracts.WorkItemToTestLinks, project: string): Promise<Contracts.WorkItemToTestLinks>;
114 deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>;
115 queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<Contracts.TestToWorkItemLinks>;
116 getTestResultWorkItemsById(project: string, runId: number, testCaseResultId: number): Promise<Contracts.WorkItemReference[]>;
117 queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<Contracts.WorkItemReference[]>;
118}
119export declare class TestResultsApi extends basem.ClientApiBase implements ITestResultsApi {
120 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
121 static readonly RESOURCE_AREA_ID = "c83eaf52-edf3-4034-ae11-17d38f25404c";
122 /**
123 * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel
124 * @param {string} project - Project ID or project name
125 * @param {number} runId
126 * @param {number} testCaseResultId
127 * @param {number} iterationId
128 * @param {string} actionPath
129 */
130 createTestIterationResultAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<Contracts.TestAttachmentReference>;
131 /**
132 * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel
133 * @param {string} project - Project ID or project name
134 * @param {number} runId
135 * @param {number} testCaseResultId
136 */
137 createTestResultAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<Contracts.TestAttachmentReference>;
138 /**
139 * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel
140 * @param {string} project - Project ID or project name
141 * @param {number} runId
142 * @param {number} testCaseResultId
143 * @param {number} testSubResultId
144 */
145 createTestSubResultAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<Contracts.TestAttachmentReference>;
146 /**
147 * @param {string} project - Project ID or project name
148 * @param {number} runId
149 * @param {number} testCaseResultId
150 * @param {number} attachmentId
151 */
152 deleteTestResultAttachment(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<void>;
153 /**
154 * Returns a test iteration attachment
155 *
156 * @param {string} project - Project ID or project name
157 * @param {number} runId
158 * @param {number} testCaseResultId
159 * @param {number} attachmentId
160 * @param {number} iterationId
161 */
162 getTestIterationAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, iterationId: number): Promise<NodeJS.ReadableStream>;
163 /**
164 * Returns a test iteration attachment
165 *
166 * @param {string} project - Project ID or project name
167 * @param {number} runId
168 * @param {number} testCaseResultId
169 * @param {number} attachmentId
170 * @param {number} iterationId
171 */
172 getTestIterationAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, iterationId: number): Promise<NodeJS.ReadableStream>;
173 /**
174 * Returns a test result attachment
175 *
176 * @param {string} project - Project ID or project name
177 * @param {number} runId
178 * @param {number} testCaseResultId
179 * @param {number} attachmentId
180 */
181 getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
182 /**
183 * @param {string} project - Project ID or project name
184 * @param {number} runId
185 * @param {number} testCaseResultId
186 */
187 getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<Contracts.TestAttachment[]>;
188 /**
189 * Returns a test result attachment
190 *
191 * @param {string} project - Project ID or project name
192 * @param {number} runId
193 * @param {number} testCaseResultId
194 * @param {number} attachmentId
195 */
196 getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
197 /**
198 * Returns a test sub result attachment
199 *
200 * @param {string} project - Project ID or project name
201 * @param {number} runId
202 * @param {number} testCaseResultId
203 * @param {number} attachmentId
204 * @param {number} testSubResultId
205 */
206 getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
207 /**
208 * Returns attachment references for test sub result.
209 *
210 * @param {string} project - Project ID or project name
211 * @param {number} runId
212 * @param {number} testCaseResultId
213 * @param {number} testSubResultId
214 */
215 getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<Contracts.TestAttachment[]>;
216 /**
217 * Returns a test sub result attachment
218 *
219 * @param {string} project - Project ID or project name
220 * @param {number} runId
221 * @param {number} testCaseResultId
222 * @param {number} attachmentId
223 * @param {number} testSubResultId
224 */
225 getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
226 /**
227 * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel
228 * @param {string} project - Project ID or project name
229 * @param {number} runId
230 */
231 createTestRunAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number): Promise<Contracts.TestAttachmentReference>;
232 /**
233 * @param {string} project - Project ID or project name
234 * @param {number} runId
235 * @param {number} attachmentId
236 */
237 deleteTestRunAttachment(project: string, runId: number, attachmentId: number): Promise<void>;
238 /**
239 * Returns a test run attachment
240 *
241 * @param {string} project - Project ID or project name
242 * @param {number} runId
243 * @param {number} attachmentId
244 */
245 getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
246 /**
247 * @param {string} project - Project ID or project name
248 * @param {number} runId
249 */
250 getTestRunAttachments(project: string, runId: number): Promise<Contracts.TestAttachment[]>;
251 /**
252 * Returns a test run attachment
253 *
254 * @param {string} project - Project ID or project name
255 * @param {number} runId
256 * @param {number} attachmentId
257 */
258 getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
259 /**
260 * @param {string} project - Project ID or project name
261 * @param {number} runId
262 * @param {number} testCaseResultId
263 */
264 getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<Contracts.WorkItemReference[]>;
265 /**
266 * @param {string} project - Project ID or project name
267 * @param {number} buildId
268 */
269 fetchSourceCodeCoverageReport(project: string, buildId: number): Promise<Contracts.SourceViewBuildCoverage[]>;
270 /**
271 * @param {string} project - Project ID or project name
272 * @param {number} buildId
273 * @param {number} flags
274 */
275 getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<Contracts.BuildCoverage[]>;
276 /**
277 * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10&deltaBuildId=9 Request: build id and delta build id (optional)
278 *
279 * @param {string} project - Project ID or project name
280 * @param {number} buildId
281 * @param {number} deltaBuildId
282 */
283 getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<Contracts.CodeCoverageSummary>;
284 /**
285 * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary
286 *
287 * @param {string} project - Project ID or project name
288 * @param {number} buildId
289 * @param {Contracts.CodeCoverageData} coverageData
290 */
291 updateCodeCoverageSummary(project: string, buildId: number, coverageData?: Contracts.CodeCoverageData): Promise<void>;
292 /**
293 * @param {string} project - Project ID or project name
294 * @param {number} runId
295 * @param {number} flags
296 */
297 getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<Contracts.TestRunCoverage[]>;
298 /**
299 * @param {Contracts.CustomTestFieldDefinition[]} newFields
300 * @param {string} project - Project ID or project name
301 */
302 addCustomFields(newFields: Contracts.CustomTestFieldDefinition[], project: string): Promise<Contracts.CustomTestFieldDefinition[]>;
303 /**
304 * @param {string} project - Project ID or project name
305 * @param {Contracts.CustomTestFieldScope} scopeFilter
306 */
307 queryCustomFields(project: string, scopeFilter: Contracts.CustomTestFieldScope): Promise<Contracts.CustomTestFieldDefinition[]>;
308 /**
309 * Get file coverage for the specified file
310 *
311 * @param {Contracts.FileCoverageRequest} fileCoverageRequest - File details with pull request iteration context
312 * @param {string} project - Project ID or project name
313 */
314 getFileLevelCodeCoverage(fileCoverageRequest: Contracts.FileCoverageRequest, project: string): Promise<NodeJS.ReadableStream>;
315 /**
316 * @param {string} project - Project ID or project name
317 * @param {number} buildDefinitionId
318 * @param {Date} minBuildCreatedDate
319 */
320 getFlakyTestResultsByBuildDefinitionId(project: string, buildDefinitionId: number, minBuildCreatedDate: Date): Promise<Contracts.TestCaseResult[]>;
321 /**
322 * @param {string} project - Project ID or project name
323 * @param {number} runId
324 */
325 getFlakyTestResultsByTestRun(project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
326 /**
327 * @param {Contracts.ResultsFilter} filter
328 * @param {string} project - Project ID or project name
329 */
330 queryTestResultHistory(filter: Contracts.ResultsFilter, project: string): Promise<Contracts.TestResultHistory>;
331 /**
332 * Get test run message logs
333 *
334 * @param {string} project - Project ID or project name
335 * @param {number} runId - ID of the run to get.
336 */
337 getTestRunMessageLogs(project: string, runId: number): Promise<Contracts.TestMessageLogDetails[]>;
338 /**
339 * Get summary of test results.
340 *
341 * @param {string} project - Project ID or project name
342 * @param {number} pipelineId - Pipeline Id. This is same as build Id.
343 * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character.
344 * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character.
345 * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
346 * @param {Contracts.Metrics[]} metricNames
347 * @param {boolean} groupByNode - Group summary for each node of the pipleine heirarchy
348 */
349 getTestPipelineMetrics(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, metricNames?: Contracts.Metrics[], groupByNode?: boolean): Promise<Contracts.PipelineTestMetrics>;
350 /**
351 * @param {string} project - Project ID or project name
352 * @param {number} buildId
353 * @param {string} publishContext
354 * @param {string} groupBy
355 * @param {string} filter
356 * @param {string} orderby
357 * @param {boolean} shouldIncludeResults
358 * @param {boolean} queryRunSummaryForInProgress
359 */
360 getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
361 /**
362 * @param {string} project - Project ID or project name
363 * @param {number} releaseId
364 * @param {number} releaseEnvId
365 * @param {string} publishContext
366 * @param {string} groupBy
367 * @param {string} filter
368 * @param {string} orderby
369 * @param {boolean} shouldIncludeResults
370 * @param {boolean} queryRunSummaryForInProgress
371 */
372 getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
373 /**
374 * @param {Contracts.TestResultDocument} document
375 * @param {string} project - Project ID or project name
376 * @param {number} runId
377 */
378 publishTestResultDocument(document: Contracts.TestResultDocument, project: string, runId: number): Promise<Contracts.TestResultDocument>;
379 /**
380 * @param {string} project - Project ID or project name
381 * @param {number} buildId
382 * @param {string} publishContext
383 * @param {string[]} fields
384 * @param {string} continuationToken
385 */
386 getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.FieldDetailsForTestResults>>;
387 /**
388 * @param {string} project - Project ID or project name
389 * @param {number} releaseId
390 * @param {string} publishContext
391 * @param {number} releaseEnvId
392 * @param {string[]} fields
393 * @param {string} continuationToken
394 */
395 getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.FieldDetailsForTestResults>>;
396 /**
397 * Get list of test Result meta data details for corresponding testcasereferenceId
398 *
399 * @param {string[]} testCaseReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200).
400 * @param {string} project - Project ID or project name
401 * @param {Contracts.ResultMetaDataDetails} detailsToInclude - Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers.
402 */
403 queryTestResultsMetaData(testCaseReferenceIds: string[], project: string, detailsToInclude?: Contracts.ResultMetaDataDetails): Promise<Contracts.TestResultMetaData[]>;
404 /**
405 * Update properties of test result meta data
406 *
407 * @param {Contracts.TestResultMetaDataUpdateInput} testResultMetaDataUpdateInput - TestResultMetaData update input TestResultMetaDataUpdateInput
408 * @param {string} project - Project ID or project name
409 * @param {number} testCaseReferenceId - TestCaseReference Id of Test Result to be updated.
410 */
411 updateTestResultsMetaData(testResultMetaDataUpdateInput: Contracts.TestResultMetaDataUpdateInput, project: string, testCaseReferenceId: number): Promise<Contracts.TestResultMetaData>;
412 /**
413 * @param {Contracts.TestResultsQuery} query
414 * @param {string} project - Project ID or project name
415 */
416 getTestResultsByQuery(query: Contracts.TestResultsQuery, project: string): Promise<Contracts.TestResultsQuery>;
417 /**
418 * @param {Contracts.QueryModel} queryModel
419 * @param {string} project - Project ID or project name
420 * @param {boolean} includeResultDetails
421 * @param {boolean} includeIterationDetails
422 * @param {number} skip
423 * @param {number} top
424 */
425 getTestResultsByQueryWiql(queryModel: Contracts.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise<Contracts.TestCaseResult[]>;
426 /**
427 * @param {Contracts.TestCaseResult[]} results
428 * @param {string} project - Project ID or project name
429 * @param {number} runId
430 */
431 addTestResultsToTestRun(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
432 /**
433 * @param {string} project - Project ID or project name
434 * @param {number} runId
435 * @param {number} testResultId
436 * @param {Contracts.ResultDetails} detailsToInclude
437 */
438 getTestResultById(project: string, runId: number, testResultId: number, detailsToInclude?: Contracts.ResultDetails): Promise<Contracts.TestCaseResult>;
439 /**
440 * @param {string} project - Project ID or project name
441 * @param {number} runId
442 * @param {Contracts.ResultDetails} detailsToInclude
443 * @param {number} skip
444 * @param {number} top
445 * @param {Contracts.TestOutcome[]} outcomes
446 * @param {boolean} newTestsOnly
447 */
448 getTestResults(project: string, runId: number, detailsToInclude?: Contracts.ResultDetails, skip?: number, top?: number, outcomes?: Contracts.TestOutcome[], newTestsOnly?: boolean): Promise<Contracts.TestCaseResult[]>;
449 /**
450 * @param {Contracts.TestCaseResult[]} results
451 * @param {string} project - Project ID or project name
452 * @param {number} runId
453 */
454 updateTestResults(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
455 /**
456 * @param {string} project - Project ID or project name
457 * @param {number} buildId
458 * @param {string} publishContext
459 * @param {Contracts.TestOutcome[]} outcomes
460 * @param {number} top
461 * @param {string} continuationToken
462 */
463 getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: Contracts.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.ShallowTestCaseResult>>;
464 /**
465 * Get a list of results.
466 *
467 * @param {string} project - Project ID or project name
468 * @param {number} pipelineId - Pipeline Id. This is same as build Id.
469 * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character.
470 * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character.
471 * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
472 * @param {Contracts.TestOutcome[]} outcomes - List of outcome of results
473 * @param {number} top - Maximum number of results to return
474 * @param {String} continuationToken - Header to pass the continuationToken
475 */
476 getTestResultsByPipeline(customHeaders: any, project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, outcomes?: Contracts.TestOutcome[], top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.ShallowTestCaseResult>>;
477 /**
478 * @param {string} project - Project ID or project name
479 * @param {number} releaseId
480 * @param {number} releaseEnvid
481 * @param {string} publishContext
482 * @param {Contracts.TestOutcome[]} outcomes
483 * @param {number} top
484 * @param {string} continuationToken
485 */
486 getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: Contracts.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.ShallowTestCaseResult>>;
487 /**
488 * Get all the available groups details and for these groups get failed and aborted results.
489 *
490 * @param {string} project - Project ID or project name
491 * @param {number} pipelineId - Pipeline Id. This is same as build Id.
492 * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character.
493 * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character.
494 * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
495 * @param {boolean} shouldIncludeFailedAndAbortedResults - If true, it will return Ids of failed and aborted results for each test group
496 * @param {boolean} queryGroupSummaryForInProgress - If true, it will calculate summary for InProgress runs as well.
497 */
498 testResultsGroupDetails(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, shouldIncludeFailedAndAbortedResults?: boolean, queryGroupSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
499 /**
500 * @param {string} project - Project ID or project name
501 * @param {number} buildId
502 * @param {string} publishContext
503 * @param {boolean} includeFailureDetails
504 * @param {Contracts.BuildReference} buildToCompare
505 */
506 queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: Contracts.BuildReference): Promise<Contracts.TestResultSummary>;
507 /**
508 * Get summary of test results.
509 *
510 * @param {string} project - Project ID or project name
511 * @param {number} pipelineId - Pipeline Id. This is same as build Id.
512 * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character.
513 * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character.
514 * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
515 * @param {boolean} includeFailureDetails - If true returns failure insights
516 */
517 queryTestResultsReportForPipeline(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, includeFailureDetails?: boolean): Promise<Contracts.TestResultSummary>;
518 /**
519 * @param {string} project - Project ID or project name
520 * @param {number} releaseId
521 * @param {number} releaseEnvId
522 * @param {string} publishContext
523 * @param {boolean} includeFailureDetails
524 * @param {Contracts.ReleaseReference} releaseToCompare
525 */
526 queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: Contracts.ReleaseReference): Promise<Contracts.TestResultSummary>;
527 /**
528 * @param {Contracts.ReleaseReference[]} releases
529 * @param {string} project - Project ID or project name
530 */
531 queryTestResultsSummaryForReleases(releases: Contracts.ReleaseReference[], project: string): Promise<Contracts.TestResultSummary[]>;
532 /**
533 * @param {Contracts.TestResultsContext} resultsContext
534 * @param {string} project - Project ID or project name
535 * @param {number[]} workItemIds
536 */
537 queryTestSummaryByRequirement(resultsContext: Contracts.TestResultsContext, project: string, workItemIds?: number[]): Promise<Contracts.TestSummaryForWorkItem[]>;
538 /**
539 * @param {Contracts.TestResultTrendFilter} filter
540 * @param {string} project - Project ID or project name
541 */
542 queryResultTrendForBuild(filter: Contracts.TestResultTrendFilter, project: string): Promise<Contracts.AggregatedDataForResultTrend[]>;
543 /**
544 * @param {Contracts.TestResultTrendFilter} filter
545 * @param {string} project - Project ID or project name
546 */
547 queryResultTrendForRelease(filter: Contracts.TestResultTrendFilter, project: string): Promise<Contracts.AggregatedDataForResultTrend[]>;
548 /**
549 * @param {Contracts.RunCreateModel} testRun
550 * @param {string} project - Project ID or project name
551 */
552 createTestRun(testRun: Contracts.RunCreateModel, project: string): Promise<Contracts.TestRun>;
553 /**
554 * @param {string} project - Project ID or project name
555 * @param {number} runId
556 */
557 deleteTestRun(project: string, runId: number): Promise<void>;
558 /**
559 * @param {string} project - Project ID or project name
560 * @param {number} runId
561 * @param {boolean} includeDetails
562 * @param {boolean} includeTags
563 */
564 getTestRunById(project: string, runId: number, includeDetails?: boolean, includeTags?: boolean): Promise<Contracts.TestRun>;
565 /**
566 * @param {string} project - Project ID or project name
567 * @param {string} buildUri
568 * @param {string} owner
569 * @param {string} tmiRunId
570 * @param {number} planId
571 * @param {boolean} includeRunDetails
572 * @param {boolean} automated
573 * @param {number} skip
574 * @param {number} top
575 */
576 getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<Contracts.TestRun[]>;
577 /**
578 * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.
579 *
580 * @param {string} project - Project ID or project name
581 * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory).
582 * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
583 * @param {Contracts.TestRunState} state - Current state of the Runs to be queried.
584 * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids.
585 * @param {boolean} isAutomated - Automation type of the Runs to be queried.
586 * @param {Contracts.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried.
587 * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids.
588 * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids.
589 * @param {string} branchName - Source Branch name of the Runs to be queried.
590 * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids.
591 * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids.
592 * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids.
593 * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids.
594 * @param {string} runTitle - Run Title of the Runs to be queried.
595 * @param {number} top - Number of runs to be queried. Limit is 100
596 * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user.
597 */
598 queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: Contracts.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: Contracts.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<Contracts.TestRun>>;
599 /**
600 * @param {Contracts.RunUpdateModel} runUpdateModel
601 * @param {string} project - Project ID or project name
602 * @param {number} runId
603 */
604 updateTestRun(runUpdateModel: Contracts.RunUpdateModel, project: string, runId: number): Promise<Contracts.TestRun>;
605 /**
606 * Get test run summary, used when we want to get summary of a run by outcome. Test run should be in completed state.
607 *
608 * @param {string} project - Project ID or project name
609 * @param {number} runId - ID of the run to get.
610 */
611 getTestRunSummaryByOutcome(project: string, runId: number): Promise<Contracts.TestRunStatistic>;
612 /**
613 * Get TestResultsSettings data
614 *
615 * @param {string} project - Project ID or project name
616 * @param {Contracts.TestResultsSettingsType} settingsType
617 */
618 getTestResultsSettings(project: string, settingsType?: Contracts.TestResultsSettingsType): Promise<Contracts.TestResultsSettings>;
619 /**
620 * Update project settings of test results
621 *
622 * @param {Contracts.TestResultsUpdateSettings} testResultsUpdateSettings
623 * @param {string} project - Project ID or project name
624 */
625 updatePipelinesTestSettings(testResultsUpdateSettings: Contracts.TestResultsUpdateSettings, project: string): Promise<Contracts.TestResultsSettings>;
626 /**
627 * Gets the list of results whose failure matches with the provided one.
628 *
629 * @param {string} project - Project ID or project name
630 * @param {number} runId - id of test run
631 * @param {number} testResultId - id of test result inside a test run
632 * @param {number} testSubResultId - id of subresult inside a test result
633 * @param {number} top - Maximum number of results to return
634 * @param {String} continuationToken - Header to pass the continuationToken
635 */
636 getSimilarTestResults(customHeaders: any, project: string, runId: number, testResultId: number, testSubResultId: number, top?: number, continuationToken?: String): Promise<Contracts.TestCaseResult[]>;
637 /**
638 * Get test run statistics , used when we want to get summary of a run by outcome.
639 *
640 * @param {string} project - Project ID or project name
641 * @param {number} runId - ID of the run to get.
642 */
643 getTestRunStatistics(project: string, runId: number): Promise<Contracts.TestRunStatistic>;
644 /**
645 * <p>Gets the coverage status for the last successful build of a definition, optionally scoped to a specific branch</p>
646 *
647 * @param {string} project - Project ID or project name
648 * @param {string} definition - The ID or name of the definition.
649 * @param {string} branchName - The branch name.
650 * @param {string} label - The String to replace the default text on the left side of the badge.
651 */
652 getCoverageStatusBadge(project: string, definition: string, branchName?: string, label?: string): Promise<string>;
653 /**
654 * Get all the tags in a build.
655 *
656 * @param {string} project - Project ID or project name
657 * @param {number} buildId - Build ID
658 */
659 getTestTagsForBuild(project: string, buildId: number): Promise<Contracts.TestTag[]>;
660 /**
661 * Get all the tags in a release.
662 *
663 * @param {string} project - Project ID or project name
664 * @param {number} releaseId - Release ID
665 * @param {number} releaseEnvId - Release environment ID
666 */
667 getTestTagsForRelease(project: string, releaseId: number, releaseEnvId: number): Promise<Contracts.TestTag[]>;
668 /**
669 * Update tags of a run, Tags can be Added and Deleted
670 *
671 * @param {Contracts.TestTagsUpdateModel} testTagsUpdateModel - TestTagsUpdateModel
672 * @param {string} project - Project ID or project name
673 * @param {number} runId - RunId of the run
674 */
675 updateTestRunTags(testTagsUpdateModel: Contracts.TestTagsUpdateModel, project: string, runId: number): Promise<Contracts.TestTag[]>;
676 /**
677 * Get all the tags in a build.
678 *
679 * @param {string} project - Project ID or project name
680 * @param {number} buildId - Build ID
681 */
682 getTestTagSummaryForBuild(project: string, buildId: number): Promise<Contracts.TestTagSummary>;
683 /**
684 * Get all the tags in a release.
685 *
686 * @param {string} project - Project ID or project name
687 * @param {number} releaseId - Release ID
688 * @param {number} releaseEnvId - Release environment ID
689 */
690 getTestTagSummaryForRelease(project: string, releaseId: number, releaseEnvId: number): Promise<Contracts.TestTagSummary>;
691 /**
692 * Creates an attachment in the LogStore for the specified buildId.
693 *
694 * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType
695 * @param {string} project - Project ID or project name
696 * @param {number} buildId - BuildId
697 */
698 createBuildAttachmentInLogStore(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, buildId: number): Promise<void>;
699 /**
700 * Creates an attachment in the LogStore for the specified runId.
701 *
702 * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType
703 * @param {string} project - Project ID or project name
704 * @param {number} runId - Test RunId
705 */
706 createTestRunLogStoreAttachment(attachmentRequestModel: Contracts.TestAttachmentRequestModel, project: string, runId: number): Promise<Contracts.TestLogStoreAttachmentReference>;
707 /**
708 * Deletes the attachment with the specified filename for the specified runId from the LogStore.
709 *
710 * @param {string} project - Project ID or project name
711 * @param {number} runId - Test RunId
712 * @param {string} filename - Attachment FileName
713 */
714 deleteTestRunLogStoreAttachment(project: string, runId: number, filename: string): Promise<void>;
715 /**
716 * Returns the attachment with the specified filename for the specified runId from the LogStore.
717 *
718 * @param {string} project - Project ID or project name
719 * @param {number} runId - Test RunId
720 * @param {string} filename - Attachment FileName
721 */
722 getTestRunLogStoreAttachmentContent(project: string, runId: number, filename: string): Promise<NodeJS.ReadableStream>;
723 /**
724 * Returns a list of attachments for the specified runId from the LogStore.
725 *
726 * @param {string} project - Project ID or project name
727 * @param {number} runId - Test RunId
728 */
729 getTestRunLogStoreAttachments(project: string, runId: number): Promise<Contracts.TestLogStoreAttachment[]>;
730 /**
731 * Returns the attachment with the specified filename for the specified runId from the LogStore.
732 *
733 * @param {string} project - Project ID or project name
734 * @param {number} runId - Test RunId
735 * @param {string} filename - Attachment FileName
736 */
737 getTestRunLogStoreAttachmentZip(project: string, runId: number, filename: string): Promise<NodeJS.ReadableStream>;
738 /**
739 * Creates a new test failure type
740 *
741 * @param {Contracts.TestResultFailureTypeRequestModel} testResultFailureType
742 * @param {string} project - Project ID or project name
743 */
744 createFailureType(testResultFailureType: Contracts.TestResultFailureTypeRequestModel, project: string): Promise<Contracts.TestResultFailureType>;
745 /**
746 * Deletes a test failure type with specified failureTypeId
747 *
748 * @param {string} project - Project ID or project name
749 * @param {number} failureTypeId
750 */
751 deleteFailureType(project: string, failureTypeId: number): Promise<void>;
752 /**
753 * Returns the list of test failure types.
754 *
755 * @param {string} project - Project ID or project name
756 */
757 getFailureTypes(project: string): Promise<Contracts.TestResultFailureType[]>;
758 /**
759 * Get history of a test method using TestHistoryQuery
760 *
761 * @param {Contracts.TestHistoryQuery} filter - TestHistoryQuery to get history
762 * @param {string} project - Project ID or project name
763 */
764 queryTestHistory(filter: Contracts.TestHistoryQuery, project: string): Promise<Contracts.TestHistoryQuery>;
765 /**
766 * Get list of build attachments reference
767 *
768 * @param {string} project - Project ID or project name
769 * @param {number} buildId - Id of the build to get
770 * @param {Contracts.TestLogType} type - type of the attachment to get
771 * @param {string} directoryPath - directory path for which attachments are needed
772 * @param {string} fileNamePrefix - file name prefix to filter the list of attachment
773 * @param {boolean} fetchMetaData - Default is false, set if metadata is needed
774 * @param {number} top - Number of test attachments reference to return
775 * @param {String} continuationToken - Header to pass the continuationToken
776 */
777 getTestLogsForBuild(customHeaders: any, project: string, buildId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
778 /**
779 * Get list of test result attachments reference
780 *
781 * @param {string} project - Project ID or project name
782 * @param {number} runId - Id of the test run that contains the result
783 * @param {number} resultId - Id of the test result
784 * @param {Contracts.TestLogType} type - type of attachments to get
785 * @param {string} directoryPath - directory path of attachments to get
786 * @param {string} fileNamePrefix - file name prefix to filter the list of attachment
787 * @param {boolean} fetchMetaData - Default is false, set if metadata is needed
788 * @param {number} top - Numbe of attachments reference to return
789 * @param {String} continuationToken - Header to pass the continuationToken
790 */
791 getTestResultLogs(customHeaders: any, project: string, runId: number, resultId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
792 /**
793 * Get list of test subresult attachments reference
794 *
795 * @param {string} project - Project ID or project name
796 * @param {number} runId - Id of the test run that contains the results
797 * @param {number} resultId - Id of the test result that contains subresult
798 * @param {number} subResultId - Id of the test subresult
799 * @param {Contracts.TestLogType} type - type of the attachments to get
800 * @param {string} directoryPath - directory path of the attachment to get
801 * @param {string} fileNamePrefix - file name prefix to filter the list of attachments
802 * @param {boolean} fetchMetaData - Default is false, set if metadata is needed
803 * @param {number} top - Number of attachments reference to return
804 * @param {String} continuationToken - Header to pass the continuationToken
805 */
806 getTestSubResultLogs(customHeaders: any, project: string, runId: number, resultId: number, subResultId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
807 /**
808 * Get list of test run attachments reference
809 *
810 * @param {string} project - Project ID or project name
811 * @param {number} runId - Id of the test run
812 * @param {Contracts.TestLogType} type - type of the attachments to get
813 * @param {string} directoryPath - directory path for which attachments are needed
814 * @param {string} fileNamePrefix - file name prefix to filter the list of attachment
815 * @param {boolean} fetchMetaData - Default is false, set if metadata is needed
816 * @param {number} top - Number of attachments reference to return
817 * @param {String} continuationToken - Header to pass the continuationToken
818 */
819 getTestRunLogs(customHeaders: any, project: string, runId: number, type: Contracts.TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<VSSInterfaces.PagedList<Contracts.TestLog>>;
820 /**
821 * Get SAS Uri of a build attachment
822 *
823 * @param {string} project - Project ID or project name
824 * @param {number} build - Id of the build to get
825 * @param {Contracts.TestLogType} type - type of the file
826 * @param {string} filePath - filePath for which sas uri is needed
827 */
828 getTestLogStoreEndpointDetailsForBuildLog(project: string, build: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
829 /**
830 * Create and Get sas uri of the build container
831 *
832 * @param {string} project - Project ID or project name
833 * @param {number} buildId - Id of the build to get
834 * @param {Contracts.TestLogStoreOperationType} testLogStoreOperationType - Type of operation to perform using sas uri
835 */
836 testLogStoreEndpointDetailsForBuild(project: string, buildId: number, testLogStoreOperationType: Contracts.TestLogStoreOperationType): Promise<Contracts.TestLogStoreEndpointDetails>;
837 /**
838 * Get SAS Uri of a test results attachment
839 *
840 * @param {string} project - Project ID or project name
841 * @param {number} runId - Id of the test run that contains result
842 * @param {number} resultId - Id of the test result whose files need to be downloaded
843 * @param {Contracts.TestLogType} type - type of the file
844 * @param {string} filePath - filePath for which sas uri is needed
845 */
846 getTestLogStoreEndpointDetailsForResultLog(project: string, runId: number, resultId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
847 /**
848 * Get SAS Uri of a test subresults attachment
849 *
850 * @param {string} project - Project ID or project name
851 * @param {number} runId - Id of the test run that contains result
852 * @param {number} resultId - Id of the test result that contains subresult
853 * @param {number} subResultId - Id of the test subresult whose file sas uri is needed
854 * @param {Contracts.TestLogType} type - type of the file
855 * @param {string} filePath - filePath for which sas uri is needed
856 */
857 getTestLogStoreEndpointDetailsForSubResultLog(project: string, runId: number, resultId: number, subResultId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
858 /**
859 * Create empty file for a result and Get Sas uri for the file
860 *
861 * @param {string} project - Project ID or project name
862 * @param {number} runId - Id of the test run that contains the result
863 * @param {number} resultId - Id of the test results that contains sub result
864 * @param {number} subResultId - Id of the test sub result whose file sas uri is needed
865 * @param {string} filePath - file path inside the sub result for which sas uri is needed
866 * @param {Contracts.TestLogType} type - Type of the file for download
867 */
868 testLogStoreEndpointDetailsForResult(project: string, runId: number, resultId: number, subResultId: number, filePath: string, type: Contracts.TestLogType): Promise<Contracts.TestLogStoreEndpointDetails>;
869 /**
870 * Get SAS Uri of a test run attachment
871 *
872 * @param {string} project - Project ID or project name
873 * @param {number} runId - Id of the test run whose file has to be downloaded
874 * @param {Contracts.TestLogType} type - type of the file
875 * @param {string} filePath - filePath for which sas uri is needed
876 */
877 getTestLogStoreEndpointDetailsForRunLog(project: string, runId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
878 /**
879 * Create empty file for a run and Get Sas uri for the file
880 *
881 * @param {string} project - Project ID or project name
882 * @param {number} runId - Id of the run to get endpoint details
883 * @param {Contracts.TestLogStoreOperationType} testLogStoreOperationType - Type of operation to perform using sas uri
884 * @param {string} filePath - file path to create an empty file
885 * @param {Contracts.TestLogType} type - Default is GeneralAttachment, type of empty file to be created
886 */
887 testLogStoreEndpointDetailsForRun(project: string, runId: number, testLogStoreOperationType: Contracts.TestLogStoreOperationType, filePath?: string, type?: Contracts.TestLogType): Promise<Contracts.TestLogStoreEndpointDetails>;
888 /**
889 * Retrieves Test runs associated to a session
890 *
891 * @param {string} project - Project ID or project name
892 * @param {number} sessionId - Id of TestResults session to obtain Test Runs for.
893 */
894 getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>;
895 /**
896 * Creates TestResultsSession object in TCM data store
897 *
898 * @param {Contracts.TestResultsSession} session - Received session object.
899 * @param {string} project - Project ID or project name
900 */
901 createTestSession(session: Contracts.TestResultsSession, project: string): Promise<number>;
902 /**
903 * Retrieves TestResultsSession metadata object in TCM data store
904 *
905 * @param {string} project - Project ID or project name
906 * @param {number} buildId
907 */
908 getTestSession(project: string, buildId: number): Promise<Contracts.TestResultsSession[]>;
909 /**
910 * Retrieves TestResultsSession Layout object in TCM data store
911 *
912 * @param {string} project - Project ID or project name
913 * @param {string} sessionId
914 */
915 getTestSessionLayout(project: string, sessionId: string): Promise<any[]>;
916 /**
917 * Creates Environment object in TCM data store
918 *
919 * @param {Contracts.TestSessionEnvironment[]} environments - Received Environment object.
920 * @param {string} project - Project ID or project name
921 */
922 createEnvironment(environments: Contracts.TestSessionEnvironment[], project: string): Promise<void>;
923 /**
924 * Creates Notification object in TCM data store for a given session
925 *
926 * @param {Contracts.TestSessionNotification[]} notifications - Notification(s) to add for the specified sessionId
927 * @param {string} project - Project ID or project name
928 * @param {number} sessionId - ID of Session to add Notification
929 */
930 createNotification(notifications: Contracts.TestSessionNotification[], project: string, sessionId: number): Promise<number[]>;
931 /**
932 * Retrieves TestResultsSession Notification objects in TCM data store
933 *
934 * @param {string} project - Project ID or project name
935 * @param {number} sessionId - Id of TestResults session to obtain Notifications for.
936 */
937 getSessionNotifications(project: string, sessionId: number): Promise<Contracts.TestSessionNotification[]>;
938 /**
939 * Add Test Results to test run session
940 *
941 * @param {Contracts.TestCaseResult[]} results
942 * @param {string} project - Project ID or project name
943 * @param {number} runId - RunId of test run
944 */
945 addTestResultsToTestRunSession(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<Contracts.TestCaseResult[]>;
946 /**
947 * @param {string} project - Project ID or project name
948 * @param {number} runId
949 * @param {Contracts.ResultDetails} detailsToInclude
950 * @param {number} skip
951 * @param {number} top
952 * @param {Contracts.TestOutcome[]} outcomes
953 * @param {boolean} newTestsOnly
954 */
955 getTestSessionResults(project: string, runId: number, detailsToInclude?: Contracts.ResultDetails, skip?: number, top?: number, outcomes?: Contracts.TestOutcome[], newTestsOnly?: boolean): Promise<Contracts.TestCaseResult[]>;
956 /**
957 * Creates TestResultsMRX objects in TCM data store for existing test results
958 *
959 * @param {Contracts.TestCaseResult[]} results - Results object with only test results MRX properties and existing testResultId
960 * @param {string} project - Project ID or project name
961 * @param {number} runId - RunId of test run
962 */
963 updateTestResultsToTestRunSession(results: Contracts.TestCaseResult[], project: string, runId: number): Promise<number[]>;
964 /**
965 * @param {Contracts.TestSettings} testSettings
966 * @param {string} project - Project ID or project name
967 */
968 createTestSettings(testSettings: Contracts.TestSettings, project: string): Promise<number>;
969 /**
970 * @param {string} project - Project ID or project name
971 * @param {number} testSettingsId
972 */
973 deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
974 /**
975 * @param {string} project - Project ID or project name
976 * @param {number} testSettingsId
977 */
978 getTestSettingsById(project: string, testSettingsId: number): Promise<Contracts.TestSettings>;
979 /**
980 * @param {Contracts.WorkItemToTestLinks} workItemToTestLinks
981 * @param {string} project - Project ID or project name
982 */
983 addWorkItemToTestLinks(workItemToTestLinks: Contracts.WorkItemToTestLinks, project: string): Promise<Contracts.WorkItemToTestLinks>;
984 /**
985 * @param {string} project - Project ID or project name
986 * @param {string} testName
987 * @param {number} workItemId
988 */
989 deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>;
990 /**
991 * @param {string} project - Project ID or project name
992 * @param {string} testName
993 */
994 queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<Contracts.TestToWorkItemLinks>;
995 /**
996 * @param {string} project - Project ID or project name
997 * @param {number} runId
998 * @param {number} testCaseResultId
999 */
1000 getTestResultWorkItemsById(project: string, runId: number, testCaseResultId: number): Promise<Contracts.WorkItemReference[]>;
1001 /**
1002 * Query Test Result WorkItems based on filter
1003 *
1004 * @param {string} project - Project ID or project name
1005 * @param {string} workItemCategory - can take values Microsoft.BugCategory or all(for getting all workitems)
1006 * @param {string} automatedTestName
1007 * @param {number} testCaseId
1008 * @param {Date} maxCompleteDate
1009 * @param {number} days
1010 * @param {number} workItemCount
1011 */
1012 queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<Contracts.WorkItemReference[]>;
1013}