/// import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import TestInterfaces = require("./interfaces/TestInterfaces"); import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); export interface ITestApi extends basem.ClientApiBase { getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise; getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; getTestRunAttachments(project: string, runId: number): Promise; getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise; getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise; getTestRunLogs(project: string, runId: number): Promise; getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise; getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise; getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise; getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise; queryTestResultsMetaData(testReferenceIds: string[], project: string): Promise; getResultRetentionSettings(project: string): Promise; updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise; updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise; getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise; queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise; queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; getTestRunStatistics(project: string, runId: number): Promise; createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; deleteTestRun(project: string, runId: number): Promise; getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise; getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; 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; updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise; updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; deleteSharedParameter(project: string, sharedParameterId: number): Promise; deleteSharedStep(project: string, sharedStepId: number): Promise; addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; getTestCases(project: string, planId: number, suiteId: number): Promise; removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise; deleteTestCase(project: string, testCaseId: number): Promise; queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise; createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; deleteTestSettings(project: string, testSettingsId: number): Promise; getTestSettingsById(project: string, testSettingsId: number): Promise; addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise; deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise; queryTestMethodLinkedWorkItems(project: string, testName: string): Promise; queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise; } export declare class TestApi extends basem.ClientApiBase implements ITestApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); static readonly RESOURCE_AREA_ID: string; /** * Gets the action results for an iteration in a test result. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result that contains the iterations. * @param {number} iterationId - ID of the iteration that contains the actions. * @param {string} actionPath - Path of a specific action, used to get just that action. */ getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; /** * Attach a file to test step result * * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result that contains the iteration * @param {number} iterationId - ID of the test result iteration. * @param {string} actionPath - Hex value of test result action path. */ createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; /** * Attach a file to a test result. * * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded. */ createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; /** * Attach a file to a test result * * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model. * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test results that contains sub result. * @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded. */ createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; /** * Download a test result attachment by its ID. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the testCaseResultId. * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. * @param {number} attachmentId - ID of the test result attachment to be downloaded. */ getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; /** * Get list of test result attachments reference. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result. */ getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise; /** * Download a test result attachment by its ID. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the testCaseResultId. * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. * @param {number} attachmentId - ID of the test result attachment to be downloaded. */ getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; /** * Download a test sub result attachment * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test results that contains sub result. * @param {number} attachmentId - ID of the test result attachment to be downloaded * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded */ getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; /** * Get list of test sub result attachments * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test results that contains sub result. * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded */ getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; /** * Download a test sub result attachment * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test results that contains sub result. * @param {number} attachmentId - ID of the test result attachment to be downloaded * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded */ getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; /** * Attach a file to a test run. * * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run against which attachment has to be uploaded. */ createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; /** * Download a test run attachment by its ID. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run whose attachment has to be downloaded. * @param {number} attachmentId - ID of the test run attachment to be downloaded. */ getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; /** * Get list of test run attachments reference. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run. */ getTestRunAttachments(project: string, runId: number): Promise; /** * Download a test run attachment by its ID. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run whose attachment has to be downloaded. * @param {number} attachmentId - ID of the test run attachment to be downloaded. */ getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; /** * @param {string} project - Project ID or project name * @param {number} runId * @param {number} testCaseResultId */ getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; /** * Get code coverage data for a build. * * @param {string} project - Project ID or project name * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. * @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. */ getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; /** * Get Code Coverage Summary for Build. * * @param {string} project - Project ID or project name * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. * @param {number} deltaBuildId - Delta Build id (optional) */ getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; /** * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary * * @param {TestInterfaces.CodeCoverageData} coverageData * @param {string} project - Project ID or project name * @param {number} buildId */ updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; /** * Get code coverage data for a test run * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run for which code coverage data needs to be fetched. * @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. */ getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; /** * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields * @param {string} project - Project ID or project name */ addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; /** * @param {string} project - Project ID or project name * @param {TestInterfaces.CustomTestFieldScope} scopeFilter */ queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; /** * @param {TestInterfaces.ResultsFilter} filter * @param {string} project - Project ID or project name */ queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise; /** * Get iteration for a result * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result that contains the iterations. * @param {number} iterationId - Id of the test results Iteration. * @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. */ getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; /** * Get iterations for a result * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result that contains the iterations. * @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. */ getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; /** * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery * @param {string} project - Project ID or project name */ getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise; /** * Get test run message logs * * @param {string} project - Project ID or project name * @param {number} runId - ID of the run to get. */ getTestRunLogs(project: string, runId: number): Promise; /** * Get a list of parameterized results * * @param {string} project - Project ID or project name * @param {number} runId - ID of the test run that contains the result. * @param {number} testCaseResultId - ID of the test result that contains the iterations. * @param {number} iterationId - ID of the iteration that contains the parameterized results. * @param {string} paramName - Name of the parameter. */ getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; /** * Get a test point. * * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan. * @param {number} suiteId - ID of the suite that contains the point. * @param {number} pointIds - ID of the test point to get. * @param {string} witFields - Comma-separated list of work item field names. */ getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; /** * Get a list of test points. * * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan. * @param {number} suiteId - ID of the suite that contains the points. * @param {string} witFields - Comma-separated list of work item field names. * @param {string} configurationId - Get test points for specific configuration. * @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set. * @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set. * @param {boolean} includePointDetails - Include all properties for the test point. * @param {number} skip - Number of test points to skip.. * @param {number} top - Number of test points to return. */ getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; /** * Update test points. * * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update. * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan. * @param {number} suiteId - ID of the suite that contains the points. * @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points. */ updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; /** * Get test points using query. * * @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points. * @param {string} project - Project ID or project name * @param {number} skip - Number of test points to skip.. * @param {number} top - Number of test points to return. */ getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise; /** * @param {string} project - Project ID or project name * @param {number} buildId * @param {string} publishContext * @param {string} groupBy * @param {string} filter * @param {string} orderby * @param {boolean} shouldIncludeResults * @param {boolean} queryRunSummaryForInProgress */ getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; /** * @param {string} project - Project ID or project name * @param {number} releaseId * @param {number} releaseEnvId * @param {string} publishContext * @param {string} groupBy * @param {string} filter * @param {string} orderby * @param {boolean} shouldIncludeResults * @param {boolean} queryRunSummaryForInProgress */ getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; /** * @param {TestInterfaces.TestResultDocument} document * @param {string} project - Project ID or project name * @param {number} runId */ publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise; /** * @param {string} project - Project ID or project name * @param {number} buildId * @param {string} publishContext * @param {string[]} fields * @param {string} continuationToken */ getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise; /** * @param {string} project - Project ID or project name * @param {number} releaseId * @param {string} publishContext * @param {number} releaseEnvId * @param {string[]} fields * @param {string} continuationToken */ getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise; /** * Get list of test Result meta data details for corresponding testcasereferenceId * * @param {string[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma seperated list of valid ids (limit no. of ids 200). * @param {string} project - Project ID or project name */ queryTestResultsMetaData(testReferenceIds: string[], project: string): Promise; /** * Get test result retention settings * * @param {string} project - Project ID or project name */ getResultRetentionSettings(project: string): Promise; /** * Update test result retention settings * * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated * @param {string} project - Project ID or project name */ updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; /** * Add test results to a test run. * * @param {TestInterfaces.TestCaseResult[]} results - List of test results to add. * @param {string} project - Project ID or project name * @param {number} runId - Test run ID into which test results to add. */ addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; /** * Get a test result for a test run. * * @param {string} project - Project ID or project name * @param {number} runId - Test run ID of a test result to fetch. * @param {number} testCaseResultId - Test result ID. * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults. */ getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; /** * Get test results for a test run. * * @param {string} project - Project ID or project name * @param {number} runId - Test run ID of test results to fetch. * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems. * @param {number} skip - Number of test results to skip from beginning. * @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise. * @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results. */ getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise; /** * Update test results in a test run. * * @param {TestInterfaces.TestCaseResult[]} results - List of test results to update. * @param {string} project - Project ID or project name * @param {number} runId - Test run ID whose test results to update. */ updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; /** * @param {TestInterfaces.TestResultsQuery} query * @param {string} project - Project ID or project name */ getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise; /** * @param {string} project - Project ID or project name * @param {number} buildId * @param {string} publishContext * @param {TestInterfaces.TestOutcome[]} outcomes * @param {number} top * @param {string} continuationToken */ getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; /** * @param {string} project - Project ID or project name * @param {number} releaseId * @param {number} releaseEnvid * @param {string} publishContext * @param {TestInterfaces.TestOutcome[]} outcomes * @param {number} top * @param {string} continuationToken */ getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; /** * @param {string} project - Project ID or project name * @param {number} buildId * @param {string} publishContext * @param {boolean} includeFailureDetails * @param {TestInterfaces.BuildReference} buildToCompare */ queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; /** * @param {string} project - Project ID or project name * @param {number} releaseId * @param {number} releaseEnvId * @param {string} publishContext * @param {boolean} includeFailureDetails * @param {TestInterfaces.ReleaseReference} releaseToCompare */ queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; /** * @param {TestInterfaces.ReleaseReference[]} releases * @param {string} project - Project ID or project name */ queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise; /** * @param {TestInterfaces.TestResultsContext} resultsContext * @param {string} project - Project ID or project name * @param {number[]} workItemIds */ queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise; /** * @param {TestInterfaces.TestResultTrendFilter} filter * @param {string} project - Project ID or project name */ queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; /** * @param {TestInterfaces.TestResultTrendFilter} filter * @param {string} project - Project ID or project name */ queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; /** * Get test run statistics , used when we want to get summary of a run by outcome. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the run to get. */ getTestRunStatistics(project: string, runId: number): Promise; /** * Create new test run. * * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel * @param {string} project - Project ID or project name */ createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; /** * Delete a test run by its ID. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the run to delete. */ deleteTestRun(project: string, runId: number): Promise; /** * Get a test run by its ID. * * @param {string} project - Project ID or project name * @param {number} runId - ID of the run to get. * @param {boolean} includeDetails - Defualt value is true. It includes details like run statistics,release,build,Test enviornment,Post process state and more */ getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise; /** * Get a list of test runs. * * @param {string} project - Project ID or project name * @param {string} buildUri - URI of the build that the runs used. * @param {string} owner - Team foundation ID of the owner of the runs. * @param {string} tmiRunId * @param {number} planId - ID of the test plan that the runs are a part of. * @param {boolean} includeRunDetails - If true, include all the properties of the runs. * @param {boolean} automated - If true, only returns automated runs. * @param {number} skip - Number of test runs to skip. * @param {number} top - Number of test runs to return. */ getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; /** * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. * * @param {string} project - Project ID or project name * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). * @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried. * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {boolean} isAutomated - Automation type of the Runs to be queried. * @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {string} branchName - Source Branch name of the Runs to be queried. * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10). * @param {string} runTitle - Run Title of the Runs to be queried. * @param {number} top - Number of runs to be queried. Limit is 100 * @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. */ 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; /** * Update test run by its ID. * * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel * @param {string} project - Project ID or project name * @param {number} runId - ID of the run to update. */ updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; /** * Create a test session * * @param {TestInterfaces.TestSession} testSession - Test session details for creation * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Get a list of test sessions * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {number} period - Period in days from now, for which test sessions are fetched. * @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users * @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. * @param {TestInterfaces.TestSessionSource} source - Source of the test session. * @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states */ getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise; /** * Update a test session * * @param {TestInterfaces.TestSession} testSession - Test session details for update * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * @param {string} project - Project ID or project name * @param {number} sharedParameterId */ deleteSharedParameter(project: string, sharedParameterId: number): Promise; /** * @param {string} project - Project ID or project name * @param {number} sharedStepId */ deleteSharedStep(project: string, sharedStepId: number): Promise; /** * Add test cases to suite. * * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan that contains the suite. * @param {number} suiteId - ID of the test suite to which the test cases must be added. * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. */ addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; /** * Get a specific test case in a test suite with test case id. * * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan that contains the suites. * @param {number} suiteId - ID of the suite that contains the test case. * @param {number} testCaseIds - ID of the test case to get. */ getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; /** * Get all test cases in a suite. * * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan that contains the suites. * @param {number} suiteId - ID of the suite to get. */ getTestCases(project: string, planId: number, suiteId: number): Promise; /** * 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. * * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan that contains the suite. * @param {number} suiteId - ID of the suite to get. * @param {string} testCaseIds - IDs of the test cases to remove from the suite. */ removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; /** * Updates the properties of the test case association in a suite. * * @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association. * @param {string} project - Project ID or project name * @param {number} planId - ID of the test plan that contains the suite. * @param {number} suiteId - ID of the test suite to which the test cases must be added. * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. */ updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise; /** * Delete a test case. * * @param {string} project - Project ID or project name * @param {number} testCaseId - Id of test case to delete. */ deleteTestCase(project: string, testCaseId: number): Promise; /** * Get history of a test method using TestHistoryQuery * * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history * @param {string} project - Project ID or project name */ queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise; /** * @param {TestInterfaces.TestSettings} testSettings * @param {string} project - Project ID or project name */ createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; /** * @param {string} project - Project ID or project name * @param {number} testSettingsId */ deleteTestSettings(project: string, testSettingsId: number): Promise; /** * @param {string} project - Project ID or project name * @param {number} testSettingsId */ getTestSettingsById(project: string, testSettingsId: number): Promise; /** * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks * @param {string} project - Project ID or project name */ addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise; /** * @param {string} project - Project ID or project name * @param {string} testName * @param {number} workItemId */ deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise; /** * @param {string} project - Project ID or project name * @param {string} testName */ queryTestMethodLinkedWorkItems(project: string, testName: string): Promise; /** * @param {string} project - Project ID or project name * @param {string} workItemCategory * @param {string} automatedTestName * @param {number} testCaseId * @param {Date} maxCompleteDate * @param {number} days * @param {number} workItemCount */ queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise; }