TestResultsRestClient class
Base class that should be used (derived from) to make requests to VSS REST apis
- Extends
Constructors
Test |
Properties
RESOURCE_AREA_ID |
Methods
Constructor Details
TestResultsRestClient(IVssRestClientOptions)
Property Details
RESOURCE_AREA_ID
static RESOURCE_AREA_ID: string
Property Value
string
Method Details
addCustomFields(CustomTestFieldDefinition[], string)
Creates custom test fields based on the data provided.
function addCustomFields(newFields: CustomTestFieldDefinition[], project: string): Promise<CustomTestFieldDefinition[]>
Parameters
- newFields
NewFields is an array of type CustomTestFieldDefinition.
- project
-
string
Project ID or project name
Returns
Promise<CustomTestFieldDefinition[]>
addTestResultsToTestRun(TestCaseResult[], string, number)
function addTestResultsToTestRun(results: TestCaseResult[], project: string, runId: number): Promise<TestCaseResult[]>
Parameters
- results
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestCaseResult[]>
addTestResultsToTestRunSession(TestCaseResult[], string, number)
Add Test Results to test run session
function addTestResultsToTestRunSession(results: TestCaseResult[], project: string, runId: number): Promise<TestCaseResult[]>
Parameters
- results
- project
-
string
Project ID or project name
- runId
-
number
RunId of test run
Returns
Promise<TestCaseResult[]>
addWorkItemToTestLinks(WorkItemToTestLinks, string)
function addWorkItemToTestLinks(workItemToTestLinks: WorkItemToTestLinks, project: string): Promise<WorkItemToTestLinks>
Parameters
- workItemToTestLinks
- WorkItemToTestLinks
- project
-
string
Project ID or project name
Returns
Promise<WorkItemToTestLinks>
createAnalysis(TestSessionAnalysis[], string, number)
Creates Session Analysis object in TCM data store for a given session
function createAnalysis(analysis: TestSessionAnalysis[], project: string, sessionId: number): Promise<AnalysisFailureGroupReturn[]>
Parameters
- analysis
Session Analysis details
- project
-
string
Project ID or project name
- sessionId
-
number
ID of Session to add Notification
Returns
Promise<AnalysisFailureGroupReturn[]>
createBuildAttachmentInLogStore(TestAttachmentRequestModel, string, number)
Creates an attachment in the LogStore for the specified buildId.
function createBuildAttachmentInLogStore(attachmentRequestModel: TestAttachmentRequestModel, project: string, buildId: number): Promise<void>
Parameters
- attachmentRequestModel
- TestAttachmentRequestModel
Contains attachment info like stream, filename, comment, attachmentType
- project
-
string
Project ID or project name
- buildId
-
number
BuildId
Returns
Promise<void>
createEnvironment(TestSessionEnvironment[], string)
Creates Environment object in TCM data store
function createEnvironment(environments: TestSessionEnvironment[], project: string): Promise<void>
Parameters
- environments
Received Environment object.
- project
-
string
Project ID or project name
Returns
Promise<void>
createEnvironmentAndMachine(SessionEnvironmentAndMachine, string, number)
For the provided sessionId, creates environment, configuration, and machine objects in TCM data store
function createEnvironmentAndMachine(sessionEnvironmentAndMachine: SessionEnvironmentAndMachine, project: string, sessionId: number): Promise<void>
Parameters
- sessionEnvironmentAndMachine
- SessionEnvironmentAndMachine
- project
-
string
Project ID or project name
- sessionId
-
number
Returns
Promise<void>
createFailureType(TestResultFailureTypeRequestModel, string)
Creates a new test failure type
function createFailureType(testResultFailureType: TestResultFailureTypeRequestModel, project: string): Promise<TestResultFailureType>
Parameters
- testResultFailureType
- TestResultFailureTypeRequestModel
- project
-
string
Project ID or project name
Returns
Promise<TestResultFailureType>
createNotification(TestSessionNotification[], string, number)
Creates Notification object in TCM data store for a given session
function createNotification(notifications: TestSessionNotification[], project: string, sessionId: number): Promise<number[]>
Parameters
- notifications
Notification(s) to add for the specified sessionId
- project
-
string
Project ID or project name
- sessionId
-
number
ID of Session to add Notification
Returns
Promise<number[]>
createTestIterationResultAttachment(TestAttachmentRequestModel, string, number, number, number, string)
function createTestIterationResultAttachment(attachmentRequestModel: TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestAttachmentReference>
Parameters
- attachmentRequestModel
- TestAttachmentRequestModel
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- iterationId
-
number
- actionPath
-
string
Returns
Promise<TestAttachmentReference>
createTestResultAttachment(TestAttachmentRequestModel, string, number, number)
function createTestResultAttachment(attachmentRequestModel: TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<TestAttachmentReference>
Parameters
- attachmentRequestModel
- TestAttachmentRequestModel
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
Returns
Promise<TestAttachmentReference>
createTestResultMachines(TestResultMachine[], string, number)
Creates test result machines for the provided TestRunId
function createTestResultMachines(testResultMachines: TestResultMachine[], project: string, runId: number): Promise<void>
Parameters
- testResultMachines
List of machines for test results in the run
- project
-
string
Project ID or project name
- runId
-
number
ID of the TestRun to add machines for
Returns
Promise<void>
createTestRun(RunCreateModel, string)
function createTestRun(testRun: RunCreateModel, project: string): Promise<TestRun>
Parameters
- testRun
- RunCreateModel
- project
-
string
Project ID or project name
Returns
Promise<TestRun>
createTestRunAttachment(TestAttachmentRequestModel, string, number)
function createTestRunAttachment(attachmentRequestModel: TestAttachmentRequestModel, project: string, runId: number): Promise<TestAttachmentReference>
Parameters
- attachmentRequestModel
- TestAttachmentRequestModel
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestAttachmentReference>
createTestRunLogStoreAttachment(TestAttachmentRequestModel, string, number)
Creates an attachment in the LogStore for the specified runId.
function createTestRunLogStoreAttachment(attachmentRequestModel: TestAttachmentRequestModel, project: string, runId: number): Promise<TestLogStoreAttachmentReference>
Parameters
- attachmentRequestModel
- TestAttachmentRequestModel
Contains attachment info like stream, filename, comment, attachmentType
- project
-
string
Project ID or project name
- runId
-
number
Test RunId
Returns
Promise<TestLogStoreAttachmentReference>
createTestSession(TestResultsSession, string)
Creates TestResultsSession object in TCM data store
function createTestSession(session: TestResultsSession, project: string): Promise<number>
Parameters
- session
- TestResultsSession
Received session object.
- project
-
string
Project ID or project name
Returns
Promise<number>
createTestSettings(TestSettings, string)
function createTestSettings(testSettings: TestSettings, project: string): Promise<number>
Parameters
- testSettings
- TestSettings
- project
-
string
Project ID or project name
Returns
Promise<number>
createTestSubResultAttachment(TestAttachmentRequestModel, string, number, number, number)
function createTestSubResultAttachment(attachmentRequestModel: TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestAttachmentReference>
Parameters
- attachmentRequestModel
- TestAttachmentRequestModel
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- testSubResultId
-
number
Returns
Promise<TestAttachmentReference>
deleteCustomFieldById(string, number)
Returns details of the custom test field for the specified testExtensionFieldId.
function deleteCustomFieldById(project: string, testExtensionFieldId: number): Promise<void>
Parameters
- project
-
string
Project ID or project name
- testExtensionFieldId
-
number
Custom test field id which has to be deleted.
Returns
Promise<void>
deleteFailureType(string, number)
Deletes a test failure type with specified failureTypeId
function deleteFailureType(project: string, failureTypeId: number): Promise<void>
Parameters
- project
-
string
Project ID or project name
- failureTypeId
-
number
Returns
Promise<void>
deleteTestMethodToWorkItemLink(string, string, number)
function deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>
Parameters
- project
-
string
Project ID or project name
- testName
-
string
- workItemId
-
number
Returns
Promise<boolean>
deleteTestResultAttachment(string, number, number, number)
function deleteTestResultAttachment(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<void>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
Returns
Promise<void>
deleteTestRun(string, number)
function deleteTestRun(project: string, runId: number): Promise<void>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<void>
deleteTestRunAttachment(string, number, number)
function deleteTestRunAttachment(project: string, runId: number, attachmentId: number): Promise<void>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- attachmentId
-
number
Returns
Promise<void>
deleteTestRunLogStoreAttachment(string, number, string)
Deletes the attachment with the specified filename for the specified runId from the LogStore.
function deleteTestRunLogStoreAttachment(project: string, runId: number, filename: string): Promise<void>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Test RunId
- filename
-
string
Attachment FileName
Returns
Promise<void>
deleteTestSettings(string, number)
function deleteTestSettings(project: string, testSettingsId: number): Promise<void>
Parameters
- project
-
string
Project ID or project name
- testSettingsId
-
number
Returns
Promise<void>
fetchSourceCodeCoverageReport(string, number)
function fetchSourceCodeCoverageReport(project: string, buildId: number): Promise<SourceViewBuildCoverage[]>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
Returns
Promise<SourceViewBuildCoverage[]>
getBugsLinkedToTestResult(string, number, number)
function getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<WorkItemReference[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
Returns
Promise<WorkItemReference[]>
getBuildCodeCoverage(string, number, number)
function getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<BuildCoverage[]>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- flags
-
number
Returns
Promise<BuildCoverage[]>
getCodeCoverageSummary(string, number, number)
http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10&deltaBuildId=9 Request: build id and delta build id (optional)
function getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<CodeCoverageSummary>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- deltaBuildId
-
number
Returns
Promise<CodeCoverageSummary>
getCoverageStatusBadge(string, string, string, string)
<p>Gets the coverage status for the last successful build of a definition, optionally scoped to a specific branch</p>
function getCoverageStatusBadge(project: string, definition: string, branchName?: string, label?: string): Promise<string>
Parameters
- project
-
string
Project ID or project name
- definition
-
string
The ID or name of the definition.
- branchName
-
string
The branch name.
- label
-
string
The String to replace the default text on the left side of the badge.
Returns
Promise<string>
getFailureTypes(string)
Returns the list of test failure types.
function getFailureTypes(project: string): Promise<TestResultFailureType[]>
Parameters
- project
-
string
Project ID or project name
Returns
Promise<TestResultFailureType[]>
getFileLevelCodeCoverage(FileCoverageRequest, string)
Get file coverage for the specified file
function getFileLevelCodeCoverage(fileCoverageRequest: FileCoverageRequest, project: string): Promise<string>
Parameters
- fileCoverageRequest
- FileCoverageRequest
File details with pull request iteration context
- project
-
string
Project ID or project name
Returns
Promise<string>
getFlakyTestResultsByBuildDefinitionId(string, number, Date)
function getFlakyTestResultsByBuildDefinitionId(project: string, buildDefinitionId: number, minBuildCreatedDate: Date): Promise<TestCaseResult[]>
Parameters
- project
-
string
Project ID or project name
- buildDefinitionId
-
number
- minBuildCreatedDate
-
Date
Returns
Promise<TestCaseResult[]>
getFlakyTestResultsByTestRun(string, number)
function getFlakyTestResultsByTestRun(project: string, runId: number): Promise<TestCaseResult[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestCaseResult[]>
getResultGroupsByBuild(string, number, string, string[], string)
function getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<PagedList<FieldDetailsForTestResults>>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- publishContext
-
string
- fields
-
string[]
- continuationToken
-
string
Returns
Promise<PagedList<FieldDetailsForTestResults>>
getResultGroupsByRelease(string, number, string, number, string[], string)
function getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<PagedList<FieldDetailsForTestResults>>
Parameters
- project
-
string
Project ID or project name
- releaseId
-
number
- publishContext
-
string
- releaseEnvId
-
number
- fields
-
string[]
- continuationToken
-
string
Returns
Promise<PagedList<FieldDetailsForTestResults>>
getSessionNotifications(string, number)
Retrieves TestResultsSession Notification objects in TCM data store
function getSessionNotifications(project: string, sessionId: number): Promise<TestSessionNotification[]>
Parameters
- project
-
string
Project ID or project name
- sessionId
-
number
Id of TestResults session to obtain Notifications for.
Returns
Promise<TestSessionNotification[]>
getSimilarTestResults(string, number, number, number, number, String)
Gets the list of results whose failure matches with the provided one.
function getSimilarTestResults(project: string, runId: number, testResultId: number, testSubResultId: number, top?: number, continuationToken?: String): Promise<TestCaseResult[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
id of test run
- testResultId
-
number
id of test result inside a test run
- testSubResultId
-
number
id of subresult inside a test result
- top
-
number
Maximum number of results to return
- continuationToken
-
String
Header to pass the continuationToken
Returns
Promise<TestCaseResult[]>
getTestIterationAttachmentContent(string, number, number, number, number)
Returns a test iteration attachment
function getTestIterationAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, iterationId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
- iterationId
-
number
Returns
Promise<ArrayBuffer>
getTestIterationAttachmentZip(string, number, number, number, number)
Returns a test iteration attachment
function getTestIterationAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, iterationId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
- iterationId
-
number
Returns
Promise<ArrayBuffer>
getTestLogsForBuild(string, number, TestLogType, string, string, boolean, number, String)
Get list of build attachments reference
function getTestLogsForBuild(project: string, buildId: number, type: TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<PagedList<TestLog>>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
Id of the build to get
- type
- TestLogType
type of the attachment to get
- directoryPath
-
string
directory path for which attachments are needed
- fileNamePrefix
-
string
file name prefix to filter the list of attachment
- fetchMetaData
-
boolean
Default is false, set if metadata is needed
- top
-
number
Number of test attachments reference to return
- continuationToken
-
String
Header to pass the continuationToken
Returns
getTestLogStoreEndpointDetailsForBuildLog(string, number, TestLogType, string)
Get SAS Uri of a build attachment
function getTestLogStoreEndpointDetailsForBuildLog(project: string, build: number, type: TestLogType, filePath: string): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- build
-
number
Id of the build to get
- type
- TestLogType
type of the file
- filePath
-
string
filePath for which sas uri is needed
Returns
Promise<TestLogStoreEndpointDetails>
getTestLogStoreEndpointDetailsForResultLog(string, number, number, TestLogType, string)
Get SAS Uri of a test results attachment
function getTestLogStoreEndpointDetailsForResultLog(project: string, runId: number, resultId: number, type: TestLogType, filePath: string): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run that contains result
- resultId
-
number
Id of the test result whose files need to be downloaded
- type
- TestLogType
type of the file
- filePath
-
string
filePath for which sas uri is needed
Returns
Promise<TestLogStoreEndpointDetails>
getTestLogStoreEndpointDetailsForRunLog(string, number, TestLogType, string)
Get SAS Uri of a test run attachment
function getTestLogStoreEndpointDetailsForRunLog(project: string, runId: number, type: TestLogType, filePath: string): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run whose file has to be downloaded
- type
- TestLogType
type of the file
- filePath
-
string
filePath for which sas uri is needed
Returns
Promise<TestLogStoreEndpointDetails>
getTestLogStoreEndpointDetailsForSubResultLog(string, number, number, number, TestLogType, string)
Get SAS Uri of a test subresults attachment
function getTestLogStoreEndpointDetailsForSubResultLog(project: string, runId: number, resultId: number, subResultId: number, type: TestLogType, filePath: string): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run that contains result
- resultId
-
number
Id of the test result that contains subresult
- subResultId
-
number
Id of the test subresult whose file sas uri is needed
- type
- TestLogType
type of the file
- filePath
-
string
filePath for which sas uri is needed
Returns
Promise<TestLogStoreEndpointDetails>
getTestPipelineMetrics(string, number, string, string, string, Metrics[], boolean)
Get summary of test results.
function getTestPipelineMetrics(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, metricNames?: Metrics[], groupByNode?: boolean): Promise<PipelineTestMetrics>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
Pipeline Id. This is same as build Id.
- stageName
-
string
Name of the stage. Maximum supported length for name is 256 character.
- phaseName
-
string
Name of the phase. Maximum supported length for name is 256 character.
- jobName
-
string
Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
- metricNames
-
Metrics[]
- groupByNode
-
boolean
Group summary for each node of the pipleine heirarchy
Returns
Promise<PipelineTestMetrics>
getTestResultAttachmentContent(string, number, number, number)
Returns a test result attachment
function getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
Returns
Promise<ArrayBuffer>
getTestResultAttachments(string, number, number)
function getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<TestAttachment[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
Returns
Promise<TestAttachment[]>
getTestResultAttachmentZip(string, number, number, number)
Returns a test result attachment
function getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
Returns
Promise<ArrayBuffer>
getTestResultById(string, number, number, ResultDetails)
function getTestResultById(project: string, runId: number, testResultId: number, detailsToInclude?: ResultDetails): Promise<TestCaseResult>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testResultId
-
number
- detailsToInclude
- ResultDetails
Returns
Promise<TestCaseResult>
getTestResultDetailsForBuild(string, number, string, string, string, string, boolean, boolean)
function getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestResultsDetails>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- publishContext
-
string
- groupBy
-
string
- filter
-
string
- orderby
-
string
- shouldIncludeResults
-
boolean
- queryRunSummaryForInProgress
-
boolean
Returns
Promise<TestResultsDetails>
getTestResultDetailsForRelease(string, number, number, string, string, string, string, boolean, boolean)
function getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestResultsDetails>
Parameters
- project
-
string
Project ID or project name
- releaseId
-
number
- releaseEnvId
-
number
- publishContext
-
string
- groupBy
-
string
- filter
-
string
- orderby
-
string
- shouldIncludeResults
-
boolean
- queryRunSummaryForInProgress
-
boolean
Returns
Promise<TestResultsDetails>
getTestResultLogs(string, number, number, TestLogType, string, string, boolean, number, String)
Get list of test result attachments reference
function getTestResultLogs(project: string, runId: number, resultId: number, type: TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<PagedList<TestLog>>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run that contains the result
- resultId
-
number
Id of the test result
- type
- TestLogType
type of attachments to get
- directoryPath
-
string
directory path of attachments to get
- fileNamePrefix
-
string
file name prefix to filter the list of attachment
- fetchMetaData
-
boolean
Default is false, set if metadata is needed
- top
-
number
Numbe of attachments reference to return
- continuationToken
-
String
Header to pass the continuationToken
Returns
getTestResultMachines(string, number)
Gets test result machines for the provided TestRunId
function getTestResultMachines(project: string, runId: number): Promise<TestResultMachine[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
ID of the TestRun to add machines for
Returns
Promise<TestResultMachine[]>
getTestResults(string, number, ResultDetails, number, number, TestOutcome[], boolean)
function getTestResults(project: string, runId: number, detailsToInclude?: ResultDetails, skip?: number, top?: number, outcomes?: TestOutcome[], newTestsOnly?: boolean): Promise<TestCaseResult[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- detailsToInclude
- ResultDetails
- skip
-
number
- top
-
number
- outcomes
- newTestsOnly
-
boolean
Returns
Promise<TestCaseResult[]>
getTestResultsByBuild(string, number, string, TestOutcome[], number, string)
function getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestOutcome[], top?: number, continuationToken?: string): Promise<PagedList<ShallowTestCaseResult>>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- publishContext
-
string
- outcomes
- top
-
number
- continuationToken
-
string
Returns
Promise<PagedList<ShallowTestCaseResult>>
getTestResultsByPipeline(string, number, string, string, string, TestOutcome[], number, String)
Get a list of results.
function getTestResultsByPipeline(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, outcomes?: TestOutcome[], top?: number, continuationToken?: String): Promise<PagedList<ShallowTestCaseResult>>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
Pipeline Id. This is same as build Id.
- stageName
-
string
Name of the stage. Maximum supported length for name is 256 character.
- phaseName
-
string
Name of the phase. Maximum supported length for name is 256 character.
- jobName
-
string
Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
- outcomes
List of outcome of results
- top
-
number
Maximum number of results to return
- continuationToken
-
String
Header to pass the continuationToken
Returns
Promise<PagedList<ShallowTestCaseResult>>
getTestResultsByQuery(TestResultsQuery, string)
function getTestResultsByQuery(query: TestResultsQuery, project: string): Promise<TestResultsQuery>
Parameters
- query
- TestResultsQuery
- project
-
string
Project ID or project name
Returns
Promise<TestResultsQuery>
getTestResultsByQueryWiql(QueryModel, string, boolean, boolean, number, number)
function getTestResultsByQueryWiql(queryModel: QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise<TestCaseResult[]>
Parameters
- queryModel
- QueryModel
- project
-
string
Project ID or project name
- includeResultDetails
-
boolean
- includeIterationDetails
-
boolean
- skip
-
number
- top
-
number
Returns
Promise<TestCaseResult[]>
getTestResultsByRelease(string, number, number, string, TestOutcome[], number, string)
function getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestOutcome[], top?: number, continuationToken?: string): Promise<PagedList<ShallowTestCaseResult>>
Parameters
- project
-
string
Project ID or project name
- releaseId
-
number
- releaseEnvid
-
number
- publishContext
-
string
- outcomes
- top
-
number
- continuationToken
-
string
Returns
Promise<PagedList<ShallowTestCaseResult>>
getTestResultsSettings(string, TestResultsSettingsType)
Get TestResultsSettings data
function getTestResultsSettings(project: string, settingsType?: TestResultsSettingsType): Promise<TestResultsSettings>
Parameters
- project
-
string
Project ID or project name
- settingsType
- TestResultsSettingsType
Returns
Promise<TestResultsSettings>
getTestResultWorkItemsById(string, number, number)
function getTestResultWorkItemsById(project: string, runId: number, testCaseResultId: number): Promise<WorkItemReference[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
Returns
Promise<WorkItemReference[]>
getTestRunAttachmentContent(string, number, number)
Returns a test run attachment
function getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- attachmentId
-
number
Returns
Promise<ArrayBuffer>
getTestRunAttachments(string, number)
function getTestRunAttachments(project: string, runId: number): Promise<TestAttachment[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestAttachment[]>
getTestRunAttachmentZip(string, number, number)
Returns a test run attachment
function getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- attachmentId
-
number
Returns
Promise<ArrayBuffer>
getTestRunById(string, number, boolean, boolean)
function getTestRunById(project: string, runId: number, includeDetails?: boolean, includeTags?: boolean): Promise<TestRun>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- includeDetails
-
boolean
- includeTags
-
boolean
Returns
Promise<TestRun>
getTestRunCodeCoverage(string, number, number)
function getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<TestRunCoverage[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- flags
-
number
Returns
Promise<TestRunCoverage[]>
getTestRunLogs(string, number, TestLogType, string, string, boolean, number, String)
Get list of test run attachments reference
function getTestRunLogs(project: string, runId: number, type: TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<PagedList<TestLog>>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run
- type
- TestLogType
type of the attachments to get
- directoryPath
-
string
directory path for which attachments are needed
- fileNamePrefix
-
string
file name prefix to filter the list of attachment
- fetchMetaData
-
boolean
Default is false, set if metadata is needed
- top
-
number
Number of attachments reference to return
- continuationToken
-
String
Header to pass the continuationToken
Returns
getTestRunLogStoreAttachmentContent(string, number, string)
Returns the attachment with the specified filename for the specified runId from the LogStore.
function getTestRunLogStoreAttachmentContent(project: string, runId: number, filename: string): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Test RunId
- filename
-
string
Attachment FileName
Returns
Promise<ArrayBuffer>
getTestRunLogStoreAttachments(string, number)
Returns a list of attachments for the specified runId from the LogStore.
function getTestRunLogStoreAttachments(project: string, runId: number): Promise<TestLogStoreAttachment[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Test RunId
Returns
Promise<TestLogStoreAttachment[]>
getTestRunLogStoreAttachmentZip(string, number, string)
Returns the attachment with the specified filename for the specified runId from the LogStore.
function getTestRunLogStoreAttachmentZip(project: string, runId: number, filename: string): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Test RunId
- filename
-
string
Attachment FileName
Returns
Promise<ArrayBuffer>
getTestRunMessageLogs(string, number)
Get test run message logs
function getTestRunMessageLogs(project: string, runId: number): Promise<TestMessageLogDetails[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
ID of the run to get.
Returns
Promise<TestMessageLogDetails[]>
getTestRuns(string, string, string, string, number, boolean, boolean, number, number)
function getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<TestRun[]>
Parameters
- project
-
string
Project ID or project name
- buildUri
-
string
- owner
-
string
- tmiRunId
-
string
- planId
-
number
- includeRunDetails
-
boolean
- automated
-
boolean
- skip
-
number
- top
-
number
Returns
Promise<TestRun[]>
getTestRunsBySessionId(string, number)
Retrieves Test runs associated to a session
function getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>
Parameters
- project
-
string
Project ID or project name
- sessionId
-
number
Id of TestResults session to obtain Test Runs for.
Returns
Promise<number[]>
getTestRunStatistics(string, number)
Get test run statistics , used when we want to get summary of a run by outcome.
function getTestRunStatistics(project: string, runId: number): Promise<TestRunStatistic>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
ID of the run to get.
Returns
Promise<TestRunStatistic>
getTestRunSummaryByOutcome(string, number)
Get test run summary, used when we want to get summary of a run by outcome. Test run should be in completed state.
function getTestRunSummaryByOutcome(project: string, runId: number): Promise<TestRunStatistic>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
ID of the run to get.
Returns
Promise<TestRunStatistic>
getTestSession(string, number)
Retrieves TestResultsSession metadata object in TCM data store
function getTestSession(project: string, buildId: number): Promise<TestResultsSession[]>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
Returns
Promise<TestResultsSession[]>
getTestSessionLayout(string, string)
Retrieves TestResultsSession Layout object in TCM data store
function getTestSessionLayout(project: string, sessionId: string): Promise<any[]>
Parameters
- project
-
string
Project ID or project name
- sessionId
-
string
Returns
Promise<any[]>
getTestSessionLayoutBySessionId(string, number)
Retrieves TestResultsSession Layout object in TCM data store
function getTestSessionLayoutBySessionId(project: string, sessionId: number): Promise<any[]>
Parameters
- project
-
string
Project ID or project name
- sessionId
-
number
Retrieve session object.
Returns
Promise<any[]>
getTestSessionResults(string, number, ResultDetails, number, number, TestOutcome[], boolean)
function getTestSessionResults(project: string, runId: number, detailsToInclude?: ResultDetails, skip?: number, top?: number, outcomes?: TestOutcome[], newTestsOnly?: boolean): Promise<TestCaseResult[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- detailsToInclude
- ResultDetails
- skip
-
number
- top
-
number
- outcomes
- newTestsOnly
-
boolean
Returns
Promise<TestCaseResult[]>
getTestSettingsById(string, number)
function getTestSettingsById(project: string, testSettingsId: number): Promise<TestSettings>
Parameters
- project
-
string
Project ID or project name
- testSettingsId
-
number
Returns
Promise<TestSettings>
getTestSubResultAttachmentContent(string, number, number, number, number)
Returns a test sub result attachment
function getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
- testSubResultId
-
number
Returns
Promise<ArrayBuffer>
getTestSubResultAttachments(string, number, number, number)
Returns attachment references for test sub result.
function getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestAttachment[]>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- testSubResultId
-
number
Returns
Promise<TestAttachment[]>
getTestSubResultAttachmentZip(string, number, number, number, number)
Returns a test sub result attachment
function getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<ArrayBuffer>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
- testCaseResultId
-
number
- attachmentId
-
number
- testSubResultId
-
number
Returns
Promise<ArrayBuffer>
getTestSubResultLogs(string, number, number, number, TestLogType, string, string, boolean, number, String)
Get list of test subresult attachments reference
function getTestSubResultLogs(project: string, runId: number, resultId: number, subResultId: number, type: TestLogType, directoryPath?: string, fileNamePrefix?: string, fetchMetaData?: boolean, top?: number, continuationToken?: String): Promise<PagedList<TestLog>>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run that contains the results
- resultId
-
number
Id of the test result that contains subresult
- subResultId
-
number
Id of the test subresult
- type
- TestLogType
type of the attachments to get
- directoryPath
-
string
directory path of the attachment to get
- fileNamePrefix
-
string
file name prefix to filter the list of attachments
- fetchMetaData
-
boolean
Default is false, set if metadata is needed
- top
-
number
Number of attachments reference to return
- continuationToken
-
String
Header to pass the continuationToken
Returns
getTestTagsForBuild(string, number)
Get all the tags in a build.
function getTestTagsForBuild(project: string, buildId: number): Promise<TestTag[]>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
Build ID
Returns
Promise<TestTag[]>
getTestTagsForRelease(string, number, number)
Get all the tags in a release.
function getTestTagsForRelease(project: string, releaseId: number, releaseEnvId: number): Promise<TestTag[]>
Parameters
- project
-
string
Project ID or project name
- releaseId
-
number
Release ID
- releaseEnvId
-
number
Release environment ID
Returns
Promise<TestTag[]>
getTestTagSummaryForBuild(string, number)
Get all the tags in a build.
function getTestTagSummaryForBuild(project: string, buildId: number): Promise<TestTagSummary>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
Build ID
Returns
Promise<TestTagSummary>
getTestTagSummaryForRelease(string, number, number)
Get all the tags in a release.
function getTestTagSummaryForRelease(project: string, releaseId: number, releaseEnvId: number): Promise<TestTagSummary>
Parameters
- project
-
string
Project ID or project name
- releaseId
-
number
Release ID
- releaseEnvId
-
number
Release environment ID
Returns
Promise<TestTagSummary>
publishTestResultDocument(TestResultDocument, string, number)
function publishTestResultDocument(document: TestResultDocument, project: string, runId: number): Promise<TestResultDocument>
Parameters
- document
- TestResultDocument
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestResultDocument>
queryCustomFields(string, CustomTestFieldScope)
Returns List of custom test fields for the given custom test field scope.
function queryCustomFields(project: string, scopeFilter: CustomTestFieldScope): Promise<CustomTestFieldDefinition[]>
Parameters
- project
-
string
Project ID or project name
- scopeFilter
- CustomTestFieldScope
Scope of custom test fields which are to be returned.
Returns
Promise<CustomTestFieldDefinition[]>
queryResultTrendForBuild(TestResultTrendFilter, string)
function queryResultTrendForBuild(filter: TestResultTrendFilter, project: string): Promise<AggregatedDataForResultTrend[]>
Parameters
- filter
- TestResultTrendFilter
- project
-
string
Project ID or project name
Returns
Promise<AggregatedDataForResultTrend[]>
queryResultTrendForRelease(TestResultTrendFilter, string)
function queryResultTrendForRelease(filter: TestResultTrendFilter, project: string): Promise<AggregatedDataForResultTrend[]>
Parameters
- filter
- TestResultTrendFilter
- project
-
string
Project ID or project name
Returns
Promise<AggregatedDataForResultTrend[]>
queryTestHistory(TestHistoryQuery, string)
Get history of a test method using TestHistoryQuery
function queryTestHistory(filter: TestHistoryQuery, project: string): Promise<TestHistoryQuery>
Parameters
- filter
- TestHistoryQuery
TestHistoryQuery to get history
- project
-
string
Project ID or project name
Returns
Promise<TestHistoryQuery>
queryTestMethodLinkedWorkItems(string, string)
function queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<TestToWorkItemLinks>
Parameters
- project
-
string
Project ID or project name
- testName
-
string
Returns
Promise<TestToWorkItemLinks>
queryTestResultHistory(ResultsFilter, string)
function queryTestResultHistory(filter: ResultsFilter, project: string): Promise<TestResultHistory>
Parameters
- filter
- ResultsFilter
- project
-
string
Project ID or project name
Returns
Promise<TestResultHistory>
queryTestResultsMetaData(string[], string, ResultMetaDataDetails)
Get list of test Result meta data details for corresponding testcasereferenceId
function queryTestResultsMetaData(testCaseReferenceIds: string[], project: string, detailsToInclude?: ResultMetaDataDetails): Promise<TestResultMetaData[]>
Parameters
- testCaseReferenceIds
-
string[]
TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200).
- project
-
string
Project ID or project name
- detailsToInclude
- ResultMetaDataDetails
Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers.
Returns
Promise<TestResultMetaData[]>
queryTestResultsReportForBuild(string, number, string, boolean, BuildReference)
function queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: BuildReference): Promise<TestResultSummary>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- publishContext
-
string
- includeFailureDetails
-
boolean
- buildToCompare
- BuildReference
Returns
Promise<TestResultSummary>
queryTestResultsReportForPipeline(string, number, string, string, string, boolean)
Get summary of test results.
function queryTestResultsReportForPipeline(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, includeFailureDetails?: boolean): Promise<TestResultSummary>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
Pipeline Id. This is same as build Id.
- stageName
-
string
Name of the stage. Maximum supported length for name is 256 character.
- phaseName
-
string
Name of the phase. Maximum supported length for name is 256 character.
- jobName
-
string
Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
- includeFailureDetails
-
boolean
If true returns failure insights
Returns
Promise<TestResultSummary>
queryTestResultsReportForRelease(string, number, number, string, boolean, ReleaseReference)
function queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: ReleaseReference): Promise<TestResultSummary>
Parameters
- project
-
string
Project ID or project name
- releaseId
-
number
- releaseEnvId
-
number
- publishContext
-
string
- includeFailureDetails
-
boolean
- releaseToCompare
- ReleaseReference
Returns
Promise<TestResultSummary>
queryTestResultsSummaryForReleases(ReleaseReference[], string)
function queryTestResultsSummaryForReleases(releases: ReleaseReference[], project: string): Promise<TestResultSummary[]>
Parameters
- releases
- project
-
string
Project ID or project name
Returns
Promise<TestResultSummary[]>
queryTestResultWorkItems(string, string, string, number, Date, number, number)
Query Test Result WorkItems based on filter
function queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<WorkItemReference[]>
Parameters
- project
-
string
Project ID or project name
- workItemCategory
-
string
can take values Microsoft.BugCategory or all(for getting all workitems)
- automatedTestName
-
string
- testCaseId
-
number
- maxCompleteDate
-
Date
- days
-
number
- workItemCount
-
number
Returns
Promise<WorkItemReference[]>
queryTestRuns(string, Date, Date, TestRunState, number[], boolean, TestRunPublishContext, number[], number[], string, number[], number[], number[], number[], string, number, string)
Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.
function queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<PagedList<TestRun>>
Parameters
- project
-
string
Project ID or project name
- minLastUpdatedDate
-
Date
Minimum Last Modified Date of run to be queried (Mandatory).
- maxLastUpdatedDate
-
Date
Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
- state
- TestRunState
Current state of the Runs to be queried.
- planIds
-
number[]
Plan Ids of the Runs to be queried, comma separated list of valid ids.
- isAutomated
-
boolean
Automation type of the Runs to be queried.
- publishContext
- TestRunPublishContext
PublishContext of the Runs to be queried.
- buildIds
-
number[]
Build Ids of the Runs to be queried, comma separated list of valid ids.
- buildDefIds
-
number[]
Build Definition Ids of the Runs to be queried, comma separated list of valid ids.
- branchName
-
string
Source Branch name of the Runs to be queried.
- releaseIds
-
number[]
Release Ids of the Runs to be queried, comma separated list of valid ids.
- releaseDefIds
-
number[]
Release Definition Ids of the Runs to be queried, comma separated list of valid ids.
- releaseEnvIds
-
number[]
Release Environment Ids of the Runs to be queried, comma separated list of valid ids.
- releaseEnvDefIds
-
number[]
Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids.
- runTitle
-
string
Run Title of the Runs to be queried.
- top
-
number
Number of runs to be queried. Limit is 100
- continuationToken
-
string
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.
Returns
queryTestSummaryByRequirement(TestResultsContext, string, number[])
function queryTestSummaryByRequirement(resultsContext: TestResultsContext, project: string, workItemIds?: number[]): Promise<TestSummaryForWorkItem[]>
Parameters
- resultsContext
- TestResultsContext
- project
-
string
Project ID or project name
- workItemIds
-
number[]
Returns
Promise<TestSummaryForWorkItem[]>
testLogStoreEndpointDetailsForBuild(string, number, TestLogStoreOperationType)
Create and Get sas uri of the build container
function testLogStoreEndpointDetailsForBuild(project: string, buildId: number, testLogStoreOperationType: TestLogStoreOperationType): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
Id of the build to get
- testLogStoreOperationType
- TestLogStoreOperationType
Type of operation to perform using sas uri
Returns
Promise<TestLogStoreEndpointDetails>
testLogStoreEndpointDetailsForResult(string, number, number, number, string, TestLogType)
Create empty file for a result and Get Sas uri for the file
function testLogStoreEndpointDetailsForResult(project: string, runId: number, resultId: number, subResultId: number, filePath: string, type: TestLogType): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the test run that contains the result
- resultId
-
number
Id of the test results that contains sub result
- subResultId
-
number
Id of the test sub result whose file sas uri is needed
- filePath
-
string
file path inside the sub result for which sas uri is needed
- type
- TestLogType
Type of the file for download
Returns
Promise<TestLogStoreEndpointDetails>
testLogStoreEndpointDetailsForRun(string, number, TestLogStoreOperationType, string, TestLogType)
Create empty file for a run and Get Sas uri for the file
function testLogStoreEndpointDetailsForRun(project: string, runId: number, testLogStoreOperationType: TestLogStoreOperationType, filePath?: string, type?: TestLogType): Promise<TestLogStoreEndpointDetails>
Parameters
- project
-
string
Project ID or project name
- runId
-
number
Id of the run to get endpoint details
- testLogStoreOperationType
- TestLogStoreOperationType
Type of operation to perform using sas uri
- filePath
-
string
file path to create an empty file
- type
- TestLogType
Default is GeneralAttachment, type of empty file to be created
Returns
Promise<TestLogStoreEndpointDetails>
testResultsGroupDetails(string, number, string, string, string, boolean, boolean)
Get all the available groups details and for these groups get failed and aborted results.
function testResultsGroupDetails(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, shouldIncludeFailedAndAbortedResults?: boolean, queryGroupSummaryForInProgress?: boolean): Promise<TestResultsDetails>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
Pipeline Id. This is same as build Id.
- stageName
-
string
Name of the stage. Maximum supported length for name is 256 character.
- phaseName
-
string
Name of the phase. Maximum supported length for name is 256 character.
- jobName
-
string
Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
- shouldIncludeFailedAndAbortedResults
-
boolean
If true, it will return Ids of failed and aborted results for each test group
- queryGroupSummaryForInProgress
-
boolean
If true, it will calculate summary for InProgress runs as well.
Returns
Promise<TestResultsDetails>
updateCodeCoverageSummary(string, number, CodeCoverageData)
http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary
function updateCodeCoverageSummary(project: string, buildId: number, coverageData?: CodeCoverageData): Promise<void>
Parameters
- project
-
string
Project ID or project name
- buildId
-
number
- coverageData
- CodeCoverageData
Returns
Promise<void>
updateCustomField(CustomTestFieldUpdateDefinition, string)
Returns details of the custom test field which is updated.
function updateCustomField(updateCustomTestField: CustomTestFieldUpdateDefinition, project: string): Promise<CustomTestFieldDefinition>
Parameters
- updateCustomTestField
- CustomTestFieldUpdateDefinition
Custom test field which has to be updated.
- project
-
string
Project ID or project name
Returns
Promise<CustomTestFieldDefinition>
updatePipelinesTestSettings(TestResultsUpdateSettings, string)
Update project settings of test results
function updatePipelinesTestSettings(testResultsUpdateSettings: TestResultsUpdateSettings, project: string): Promise<TestResultsSettings>
Parameters
- testResultsUpdateSettings
- TestResultsUpdateSettings
- project
-
string
Project ID or project name
Returns
Promise<TestResultsSettings>
updateTestResults(TestCaseResult[], string, number)
function updateTestResults(results: TestCaseResult[], project: string, runId: number): Promise<TestCaseResult[]>
Parameters
- results
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestCaseResult[]>
updateTestResultsMetaData(TestResultMetaDataUpdateInput, string, number)
Update properties of test result meta data
function updateTestResultsMetaData(testResultMetaDataUpdateInput: TestResultMetaDataUpdateInput, project: string, testCaseReferenceId: number): Promise<TestResultMetaData>
Parameters
- testResultMetaDataUpdateInput
- TestResultMetaDataUpdateInput
TestResultMetaData update input TestResultMetaDataUpdateInput
- project
-
string
Project ID or project name
- testCaseReferenceId
-
number
TestCaseReference Id of Test Result to be updated.
Returns
Promise<TestResultMetaData>
updateTestResultsToTestRunSession(TestCaseResult[], string, number)
Creates TestResultsMRX objects in TCM data store for existing test results
function updateTestResultsToTestRunSession(results: TestCaseResult[], project: string, runId: number): Promise<number[]>
Parameters
- results
Results object with only test results MRX properties and existing testResultId
- project
-
string
Project ID or project name
- runId
-
number
RunId of test run
Returns
Promise<number[]>
updateTestRun(RunUpdateModel, string, number)
function updateTestRun(runUpdateModel: RunUpdateModel, project: string, runId: number): Promise<TestRun>
Parameters
- runUpdateModel
- RunUpdateModel
- project
-
string
Project ID or project name
- runId
-
number
Returns
Promise<TestRun>
updateTestRunTags(TestTagsUpdateModel, string, number)
Update tags of a run, Tags can be Added and Deleted
function updateTestRunTags(testTagsUpdateModel: TestTagsUpdateModel, project: string, runId: number): Promise<TestTag[]>
Parameters
- testTagsUpdateModel
- TestTagsUpdateModel
TestTagsUpdateModel
- project
-
string
Project ID or project name
- runId
-
number
RunId of the run
Returns
Promise<TestTag[]>