UNPKG

50.8 kBTypeScriptView Raw
1/// <reference types="node" />
2import basem = require('./ClientApiBases');
3import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
4import TestInterfaces = require("./interfaces/TestInterfaces");
5import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
6import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
7export interface ITestApi extends basem.ClientApiBase {
8 createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestInterfaces.TestAttachmentReference>;
9 createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
10 createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
11 getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
12 getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachment[]>;
13 getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
14 getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
15 getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachment[]>;
16 getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
17 createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise<TestInterfaces.TestAttachmentReference>;
18 getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
19 getTestRunAttachments(project: string, runId: number): Promise<TestInterfaces.TestAttachment[]>;
20 getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
21 getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.WorkItemReference[]>;
22 getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<TestInterfaces.BuildCoverage[]>;
23 getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<TestInterfaces.CodeCoverageSummary>;
24 updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise<void>;
25 getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<TestInterfaces.TestRunCoverage[]>;
26 addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
27 queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
28 queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise<TestInterfaces.TestResultHistory>;
29 getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel>;
30 getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel[]>;
31 getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise<TestInterfaces.LinkedWorkItemsQueryResult[]>;
32 getTestRunLogs(project: string, runId: number): Promise<TestInterfaces.TestMessageLogDetails[]>;
33 getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise<TestInterfaces.TestPoint>;
34 getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestPoint[]>;
35 updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise<TestInterfaces.TestPoint[]>;
36 getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise<TestInterfaces.TestPointsQuery>;
37 getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
38 getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
39 publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise<TestInterfaces.TestResultDocument>;
40 getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.FieldDetailsForTestResults>>;
41 getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.FieldDetailsForTestResults>>;
42 queryTestResultsMetaData(testReferenceIds: string[], project: string): Promise<TestInterfaces.TestResultMetaData[]>;
43 getResultRetentionSettings(project: string): Promise<TestInterfaces.ResultRetentionSettings>;
44 updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise<TestInterfaces.ResultRetentionSettings>;
45 addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
46 getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise<TestInterfaces.TestCaseResult>;
47 getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise<TestInterfaces.TestCaseResult[]>;
48 updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
49 getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise<TestInterfaces.TestResultsQuery>;
50 getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.ShallowTestCaseResult>>;
51 getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.ShallowTestCaseResult>>;
52 queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise<TestInterfaces.TestResultSummary>;
53 queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise<TestInterfaces.TestResultSummary>;
54 queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise<TestInterfaces.TestResultSummary[]>;
55 queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise<TestInterfaces.TestSummaryForWorkItem[]>;
56 queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
57 queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
58 getTestRunStatistics(project: string, runId: number): Promise<TestInterfaces.TestRunStatistic>;
59 createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise<TestInterfaces.TestRun>;
60 deleteTestRun(project: string, runId: number): Promise<void>;
61 getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise<TestInterfaces.TestRun>;
62 getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestRun[]>;
63 queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestInterfaces.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestInterfaces.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.TestRun>>;
64 updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise<TestInterfaces.TestRun>;
65 createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
66 getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise<TestInterfaces.TestSession[]>;
67 updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
68 deleteSharedParameter(project: string, sharedParameterId: number): Promise<void>;
69 deleteSharedStep(project: string, sharedStepId: number): Promise<void>;
70 addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
71 getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise<TestInterfaces.SuiteTestCase>;
72 getTestCases(project: string, planId: number, suiteId: number): Promise<TestInterfaces.SuiteTestCase[]>;
73 removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<void>;
74 updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
75 deleteTestCase(project: string, testCaseId: number): Promise<void>;
76 queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise<TestInterfaces.TestHistoryQuery>;
77 createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise<number>;
78 deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
79 getTestSettingsById(project: string, testSettingsId: number): Promise<TestInterfaces.TestSettings>;
80 addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise<TestInterfaces.WorkItemToTestLinks>;
81 deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>;
82 queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<TestInterfaces.TestToWorkItemLinks>;
83 queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<TestInterfaces.WorkItemReference[]>;
84}
85export declare class TestApi extends basem.ClientApiBase implements ITestApi {
86 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
87 static readonly RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e";
88 /**
89 * Attach a file to test step result
90 *
91 * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel
92 * @param {string} project - Project ID or project name
93 * @param {number} runId - ID of the test run that contains the result.
94 * @param {number} testCaseResultId - ID of the test result that contains the iteration
95 * @param {number} iterationId - ID of the test result iteration.
96 * @param {string} actionPath - Hex value of test result action path.
97 */
98 createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestInterfaces.TestAttachmentReference>;
99 /**
100 * Attach a file to a test result.
101 *
102 * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel
103 * @param {string} project - Project ID or project name
104 * @param {number} runId - ID of the test run that contains the result.
105 * @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded.
106 */
107 createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
108 /**
109 * Attach a file to a test result
110 *
111 * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model.
112 * @param {string} project - Project ID or project name
113 * @param {number} runId - ID of the test run that contains the result.
114 * @param {number} testCaseResultId - ID of the test results that contains sub result.
115 * @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded.
116 */
117 createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
118 /**
119 * Download a test result attachment by its ID.
120 *
121 * @param {string} project - Project ID or project name
122 * @param {number} runId - ID of the test run that contains the testCaseResultId.
123 * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded.
124 * @param {number} attachmentId - ID of the test result attachment to be downloaded.
125 */
126 getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
127 /**
128 * Get list of test result attachments reference.
129 *
130 * @param {string} project - Project ID or project name
131 * @param {number} runId - ID of the test run that contains the result.
132 * @param {number} testCaseResultId - ID of the test result.
133 */
134 getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachment[]>;
135 /**
136 * Download a test result attachment by its ID.
137 *
138 * @param {string} project - Project ID or project name
139 * @param {number} runId - ID of the test run that contains the testCaseResultId.
140 * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded.
141 * @param {number} attachmentId - ID of the test result attachment to be downloaded.
142 */
143 getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
144 /**
145 * Download a test sub result attachment
146 *
147 * @param {string} project - Project ID or project name
148 * @param {number} runId - ID of the test run that contains the result.
149 * @param {number} testCaseResultId - ID of the test results that contains sub result.
150 * @param {number} attachmentId - ID of the test result attachment to be downloaded
151 * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded
152 */
153 getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
154 /**
155 * Get list of test sub result attachments
156 *
157 * @param {string} project - Project ID or project name
158 * @param {number} runId - ID of the test run that contains the result.
159 * @param {number} testCaseResultId - ID of the test results that contains sub result.
160 * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded
161 */
162 getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachment[]>;
163 /**
164 * Download a test sub result attachment
165 *
166 * @param {string} project - Project ID or project name
167 * @param {number} runId - ID of the test run that contains the result.
168 * @param {number} testCaseResultId - ID of the test results that contains sub result.
169 * @param {number} attachmentId - ID of the test result attachment to be downloaded
170 * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded
171 */
172 getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
173 /**
174 * Attach a file to a test run.
175 *
176 * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel
177 * @param {string} project - Project ID or project name
178 * @param {number} runId - ID of the test run against which attachment has to be uploaded.
179 */
180 createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise<TestInterfaces.TestAttachmentReference>;
181 /**
182 * Download a test run attachment by its ID.
183 *
184 * @param {string} project - Project ID or project name
185 * @param {number} runId - ID of the test run whose attachment has to be downloaded.
186 * @param {number} attachmentId - ID of the test run attachment to be downloaded.
187 */
188 getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
189 /**
190 * Get list of test run attachments reference.
191 *
192 * @param {string} project - Project ID or project name
193 * @param {number} runId - ID of the test run.
194 */
195 getTestRunAttachments(project: string, runId: number): Promise<TestInterfaces.TestAttachment[]>;
196 /**
197 * Download a test run attachment by its ID.
198 *
199 * @param {string} project - Project ID or project name
200 * @param {number} runId - ID of the test run whose attachment has to be downloaded.
201 * @param {number} attachmentId - ID of the test run attachment to be downloaded.
202 */
203 getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
204 /**
205 * @param {string} project - Project ID or project name
206 * @param {number} runId
207 * @param {number} testCaseResultId
208 */
209 getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.WorkItemReference[]>;
210 /**
211 * Get code coverage data for a build.
212 *
213 * @param {string} project - Project ID or project name
214 * @param {number} buildId - ID of the build for which code coverage data needs to be fetched.
215 * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
216 */
217 getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<TestInterfaces.BuildCoverage[]>;
218 /**
219 * Get Code Coverage Summary for Build.
220 *
221 * @param {string} project - Project ID or project name
222 * @param {number} buildId - ID of the build for which code coverage data needs to be fetched.
223 * @param {number} deltaBuildId - Delta Build id (optional)
224 */
225 getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<TestInterfaces.CodeCoverageSummary>;
226 /**
227 * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary
228 *
229 * @param {TestInterfaces.CodeCoverageData} coverageData
230 * @param {string} project - Project ID or project name
231 * @param {number} buildId
232 */
233 updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise<void>;
234 /**
235 * Get code coverage data for a test run
236 *
237 * @param {string} project - Project ID or project name
238 * @param {number} runId - ID of the test run for which code coverage data needs to be fetched.
239 * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
240 */
241 getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<TestInterfaces.TestRunCoverage[]>;
242 /**
243 * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields
244 * @param {string} project - Project ID or project name
245 */
246 addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
247 /**
248 * @param {string} project - Project ID or project name
249 * @param {TestInterfaces.CustomTestFieldScope} scopeFilter
250 */
251 queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
252 /**
253 * @param {TestInterfaces.ResultsFilter} filter
254 * @param {string} project - Project ID or project name
255 */
256 queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise<TestInterfaces.TestResultHistory>;
257 /**
258 * Get iteration for a result
259 *
260 * @param {string} project - Project ID or project name
261 * @param {number} runId - ID of the test run that contains the result.
262 * @param {number} testCaseResultId - ID of the test result that contains the iterations.
263 * @param {number} iterationId - Id of the test results Iteration.
264 * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
265 */
266 getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel>;
267 /**
268 * Get iterations for a result
269 *
270 * @param {string} project - Project ID or project name
271 * @param {number} runId - ID of the test run that contains the result.
272 * @param {number} testCaseResultId - ID of the test result that contains the iterations.
273 * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
274 */
275 getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel[]>;
276 /**
277 * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery
278 * @param {string} project - Project ID or project name
279 */
280 getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise<TestInterfaces.LinkedWorkItemsQueryResult[]>;
281 /**
282 * Get test run message logs
283 *
284 * @param {string} project - Project ID or project name
285 * @param {number} runId - ID of the run to get.
286 */
287 getTestRunLogs(project: string, runId: number): Promise<TestInterfaces.TestMessageLogDetails[]>;
288 /**
289 * Get a test point.
290 *
291 * @param {string} project - Project ID or project name
292 * @param {number} planId - ID of the test plan.
293 * @param {number} suiteId - ID of the suite that contains the point.
294 * @param {number} pointIds - ID of the test point to get.
295 * @param {string} witFields - Comma-separated list of work item field names.
296 */
297 getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise<TestInterfaces.TestPoint>;
298 /**
299 * Get a list of test points.
300 *
301 * @param {string} project - Project ID or project name
302 * @param {number} planId - ID of the test plan.
303 * @param {number} suiteId - ID of the suite that contains the points.
304 * @param {string} witFields - Comma-separated list of work item field names.
305 * @param {string} configurationId - Get test points for specific configuration.
306 * @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set.
307 * @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set.
308 * @param {boolean} includePointDetails - Include all properties for the test point.
309 * @param {number} skip - Number of test points to skip..
310 * @param {number} top - Number of test points to return.
311 */
312 getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestPoint[]>;
313 /**
314 * Update test points.
315 *
316 * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update.
317 * @param {string} project - Project ID or project name
318 * @param {number} planId - ID of the test plan.
319 * @param {number} suiteId - ID of the suite that contains the points.
320 * @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points.
321 */
322 updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise<TestInterfaces.TestPoint[]>;
323 /**
324 * Get test points using query.
325 *
326 * @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points.
327 * @param {string} project - Project ID or project name
328 * @param {number} skip - Number of test points to skip..
329 * @param {number} top - Number of test points to return.
330 */
331 getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise<TestInterfaces.TestPointsQuery>;
332 /**
333 * @param {string} project - Project ID or project name
334 * @param {number} buildId
335 * @param {string} publishContext
336 * @param {string} groupBy
337 * @param {string} filter
338 * @param {string} orderby
339 * @param {boolean} shouldIncludeResults
340 * @param {boolean} queryRunSummaryForInProgress
341 */
342 getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
343 /**
344 * @param {string} project - Project ID or project name
345 * @param {number} releaseId
346 * @param {number} releaseEnvId
347 * @param {string} publishContext
348 * @param {string} groupBy
349 * @param {string} filter
350 * @param {string} orderby
351 * @param {boolean} shouldIncludeResults
352 * @param {boolean} queryRunSummaryForInProgress
353 */
354 getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
355 /**
356 * @param {TestInterfaces.TestResultDocument} document
357 * @param {string} project - Project ID or project name
358 * @param {number} runId
359 */
360 publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise<TestInterfaces.TestResultDocument>;
361 /**
362 * @param {string} project - Project ID or project name
363 * @param {number} buildId
364 * @param {string} publishContext
365 * @param {string[]} fields
366 * @param {string} continuationToken
367 */
368 getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.FieldDetailsForTestResults>>;
369 /**
370 * @param {string} project - Project ID or project name
371 * @param {number} releaseId
372 * @param {string} publishContext
373 * @param {number} releaseEnvId
374 * @param {string[]} fields
375 * @param {string} continuationToken
376 */
377 getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.FieldDetailsForTestResults>>;
378 /**
379 * Get list of test Result meta data details for corresponding testcasereferenceId
380 *
381 * @param {string[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200).
382 * @param {string} project - Project ID or project name
383 */
384 queryTestResultsMetaData(testReferenceIds: string[], project: string): Promise<TestInterfaces.TestResultMetaData[]>;
385 /**
386 * Get test result retention settings
387 *
388 * @param {string} project - Project ID or project name
389 */
390 getResultRetentionSettings(project: string): Promise<TestInterfaces.ResultRetentionSettings>;
391 /**
392 * Update test result retention settings
393 *
394 * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated
395 * @param {string} project - Project ID or project name
396 */
397 updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise<TestInterfaces.ResultRetentionSettings>;
398 /**
399 * Add test results to a test run.
400 *
401 * @param {TestInterfaces.TestCaseResult[]} results - List of test results to add.
402 * @param {string} project - Project ID or project name
403 * @param {number} runId - Test run ID into which test results to add.
404 */
405 addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
406 /**
407 * Get a test result for a test run.
408 *
409 * @param {string} project - Project ID or project name
410 * @param {number} runId - Test run ID of a test result to fetch.
411 * @param {number} testCaseResultId - Test result ID.
412 * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults.
413 */
414 getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise<TestInterfaces.TestCaseResult>;
415 /**
416 * Get test results for a test run.
417 *
418 * @param {string} project - Project ID or project name
419 * @param {number} runId - Test run ID of test results to fetch.
420 * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems.
421 * @param {number} skip - Number of test results to skip from beginning.
422 * @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise.
423 * @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results.
424 */
425 getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise<TestInterfaces.TestCaseResult[]>;
426 /**
427 * Update test results in a test run.
428 *
429 * @param {TestInterfaces.TestCaseResult[]} results - List of test results to update.
430 * @param {string} project - Project ID or project name
431 * @param {number} runId - Test run ID whose test results to update.
432 */
433 updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
434 /**
435 * This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract.
436 *
437 * @param {TestInterfaces.TestResultsQuery} query
438 * @param {string} project - Project ID or project name
439 */
440 getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise<TestInterfaces.TestResultsQuery>;
441 /**
442 * @param {string} project - Project ID or project name
443 * @param {number} buildId
444 * @param {string} publishContext
445 * @param {TestInterfaces.TestOutcome[]} outcomes
446 * @param {number} top
447 * @param {string} continuationToken
448 */
449 getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.ShallowTestCaseResult>>;
450 /**
451 * @param {string} project - Project ID or project name
452 * @param {number} releaseId
453 * @param {number} releaseEnvid
454 * @param {string} publishContext
455 * @param {TestInterfaces.TestOutcome[]} outcomes
456 * @param {number} top
457 * @param {string} continuationToken
458 */
459 getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.ShallowTestCaseResult>>;
460 /**
461 * @param {string} project - Project ID or project name
462 * @param {number} buildId
463 * @param {string} publishContext
464 * @param {boolean} includeFailureDetails
465 * @param {TestInterfaces.BuildReference} buildToCompare
466 */
467 queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise<TestInterfaces.TestResultSummary>;
468 /**
469 * @param {string} project - Project ID or project name
470 * @param {number} releaseId
471 * @param {number} releaseEnvId
472 * @param {string} publishContext
473 * @param {boolean} includeFailureDetails
474 * @param {TestInterfaces.ReleaseReference} releaseToCompare
475 */
476 queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise<TestInterfaces.TestResultSummary>;
477 /**
478 * @param {TestInterfaces.ReleaseReference[]} releases
479 * @param {string} project - Project ID or project name
480 */
481 queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise<TestInterfaces.TestResultSummary[]>;
482 /**
483 * @param {TestInterfaces.TestResultsContext} resultsContext
484 * @param {string} project - Project ID or project name
485 * @param {number[]} workItemIds
486 */
487 queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise<TestInterfaces.TestSummaryForWorkItem[]>;
488 /**
489 * @param {TestInterfaces.TestResultTrendFilter} filter
490 * @param {string} project - Project ID or project name
491 */
492 queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
493 /**
494 * @param {TestInterfaces.TestResultTrendFilter} filter
495 * @param {string} project - Project ID or project name
496 */
497 queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
498 /**
499 * Get test run statistics , used when we want to get summary of a run by outcome.
500 *
501 * @param {string} project - Project ID or project name
502 * @param {number} runId - ID of the run to get.
503 */
504 getTestRunStatistics(project: string, runId: number): Promise<TestInterfaces.TestRunStatistic>;
505 /**
506 * Create new test run.
507 *
508 * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel
509 * @param {string} project - Project ID or project name
510 */
511 createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise<TestInterfaces.TestRun>;
512 /**
513 * Delete a test run by its ID.
514 *
515 * @param {string} project - Project ID or project name
516 * @param {number} runId - ID of the run to delete.
517 */
518 deleteTestRun(project: string, runId: number): Promise<void>;
519 /**
520 * Get a test run by its ID.
521 *
522 * @param {string} project - Project ID or project name
523 * @param {number} runId - ID of the run to get.
524 * @param {boolean} includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more.
525 */
526 getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise<TestInterfaces.TestRun>;
527 /**
528 * Get a list of test runs.
529 *
530 * @param {string} project - Project ID or project name
531 * @param {string} buildUri - URI of the build that the runs used.
532 * @param {string} owner - Team foundation ID of the owner of the runs.
533 * @param {string} tmiRunId
534 * @param {number} planId - ID of the test plan that the runs are a part of.
535 * @param {boolean} includeRunDetails - If true, include all the properties of the runs.
536 * @param {boolean} automated - If true, only returns automated runs.
537 * @param {number} skip - Number of test runs to skip.
538 * @param {number} top - Number of test runs to return.
539 */
540 getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestRun[]>;
541 /**
542 * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.
543 *
544 * @param {string} project - Project ID or project name
545 * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory).
546 * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
547 * @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried.
548 * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
549 * @param {boolean} isAutomated - Automation type of the Runs to be queried.
550 * @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried.
551 * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
552 * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
553 * @param {string} branchName - Source Branch name of the Runs to be queried.
554 * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
555 * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
556 * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
557 * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
558 * @param {string} runTitle - Run Title of the Runs to be queried.
559 * @param {number} top - Number of runs to be queried. Limit is 100
560 * @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.
561 */
562 queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestInterfaces.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestInterfaces.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<VSSInterfaces.PagedList<TestInterfaces.TestRun>>;
563 /**
564 * Update test run by its ID.
565 *
566 * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel
567 * @param {string} project - Project ID or project name
568 * @param {number} runId - ID of the run to update.
569 */
570 updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise<TestInterfaces.TestRun>;
571 /**
572 * Create a test session
573 *
574 * @param {TestInterfaces.TestSession} testSession - Test session details for creation
575 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
576 */
577 createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
578 /**
579 * Get a list of test sessions
580 *
581 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
582 * @param {number} period - Period in days from now, for which test sessions are fetched.
583 * @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users
584 * @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version.
585 * @param {TestInterfaces.TestSessionSource} source - Source of the test session.
586 * @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states
587 */
588 getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise<TestInterfaces.TestSession[]>;
589 /**
590 * Update a test session
591 *
592 * @param {TestInterfaces.TestSession} testSession - Test session details for update
593 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
594 */
595 updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
596 /**
597 * @param {string} project - Project ID or project name
598 * @param {number} sharedParameterId
599 */
600 deleteSharedParameter(project: string, sharedParameterId: number): Promise<void>;
601 /**
602 * @param {string} project - Project ID or project name
603 * @param {number} sharedStepId
604 */
605 deleteSharedStep(project: string, sharedStepId: number): Promise<void>;
606 /**
607 * Add test cases to suite.
608 *
609 * @param {string} project - Project ID or project name
610 * @param {number} planId - ID of the test plan that contains the suite.
611 * @param {number} suiteId - ID of the test suite to which the test cases must be added.
612 * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format.
613 */
614 addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
615 /**
616 * Get a specific test case in a test suite with test case id.
617 *
618 * @param {string} project - Project ID or project name
619 * @param {number} planId - ID of the test plan that contains the suites.
620 * @param {number} suiteId - ID of the suite that contains the test case.
621 * @param {number} testCaseIds - ID of the test case to get.
622 */
623 getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise<TestInterfaces.SuiteTestCase>;
624 /**
625 * Get all test cases in a suite.
626 *
627 * @param {string} project - Project ID or project name
628 * @param {number} planId - ID of the test plan that contains the suites.
629 * @param {number} suiteId - ID of the suite to get.
630 */
631 getTestCases(project: string, planId: number, suiteId: number): Promise<TestInterfaces.SuiteTestCase[]>;
632 /**
633 * The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently.
634 *
635 * @param {string} project - Project ID or project name
636 * @param {number} planId - ID of the test plan that contains the suite.
637 * @param {number} suiteId - ID of the suite to get.
638 * @param {string} testCaseIds - IDs of the test cases to remove from the suite.
639 */
640 removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<void>;
641 /**
642 * Updates the properties of the test case association in a suite.
643 *
644 * @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association.
645 * @param {string} project - Project ID or project name
646 * @param {number} planId - ID of the test plan that contains the suite.
647 * @param {number} suiteId - ID of the test suite to which the test cases must be added.
648 * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format.
649 */
650 updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
651 /**
652 * Delete a test case.
653 *
654 * @param {string} project - Project ID or project name
655 * @param {number} testCaseId - Id of test case to delete.
656 */
657 deleteTestCase(project: string, testCaseId: number): Promise<void>;
658 /**
659 * Get history of a test method using TestHistoryQuery
660 *
661 * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history
662 * @param {string} project - Project ID or project name
663 */
664 queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise<TestInterfaces.TestHistoryQuery>;
665 /**
666 * @param {TestInterfaces.TestSettings} testSettings
667 * @param {string} project - Project ID or project name
668 */
669 createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise<number>;
670 /**
671 * @param {string} project - Project ID or project name
672 * @param {number} testSettingsId
673 */
674 deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
675 /**
676 * @param {string} project - Project ID or project name
677 * @param {number} testSettingsId
678 */
679 getTestSettingsById(project: string, testSettingsId: number): Promise<TestInterfaces.TestSettings>;
680 /**
681 * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks
682 * @param {string} project - Project ID or project name
683 */
684 addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise<TestInterfaces.WorkItemToTestLinks>;
685 /**
686 * @param {string} project - Project ID or project name
687 * @param {string} testName
688 * @param {number} workItemId
689 */
690 deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>;
691 /**
692 * @param {string} project - Project ID or project name
693 * @param {string} testName
694 */
695 queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<TestInterfaces.TestToWorkItemLinks>;
696 /**
697 * @param {string} project - Project ID or project name
698 * @param {string} workItemCategory
699 * @param {string} automatedTestName
700 * @param {number} testCaseId
701 * @param {Date} maxCompleteDate
702 * @param {number} days
703 * @param {number} workItemCount
704 */
705 queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<TestInterfaces.WorkItemReference[]>;
706}