azure-devops-node-api
Version:
Node client for Azure DevOps and TFS REST APIs
2,078 lines • 138 kB
TypeScript
import SystemData = require("../interfaces/common/SystemDataInterfaces");
import TfsCoreInterfaces = require("../interfaces/CoreInterfaces");
import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
export interface AbortTestRunRequest {
options?: number;
projectName?: string;
revision?: number;
testRunId?: number;
}
export interface AfnStrip {
/**
* Auxiliary Url to be consumed by MTM
*/
auxiliaryUrl?: string;
/**
* Creation date of the AfnStrip
*/
creationDate?: Date;
/**
* File name of the attachment created
*/
fileName?: string;
/**
* ID of AfnStrip. This is same as the attachment ID.
*/
id?: number;
/**
* Project identifier which contains AfnStrip
*/
project?: string;
/**
* Service in which this attachment is stored in
*/
storedIn?: string;
/**
* Afn strip stream.
*/
stream?: string;
/**
* ID of the testcase.
*/
testCaseId?: number;
/**
* Backing test result id.
*/
testResultId?: number;
/**
* Backing test run id.
*/
testRunId?: number;
/**
* Byte stream (uncompressed) length of Afn strip.
*/
unCompressedStreamLength?: number;
/**
* Url of the attachment created.
*/
url?: string;
}
export interface AggregatedDataForResultTrend {
/**
* This is tests execution duration.
*/
duration?: any;
resultsByOutcome?: {
[key: number]: AggregatedResultsByOutcome;
};
runSummaryByState?: {
[key: number]: AggregatedRunsByState;
};
testResultsContext: TestResultsContext;
totalTests?: number;
}
/**
* Result deatils for a particular test result outcome.
*/
export interface AggregatedResultDetailsByOutcome {
/**
* Number of results for current outcome.
*/
count?: number;
/**
* Time taken by results.
*/
duration?: any;
/**
* Test result outcome
*/
outcome?: TestOutcome;
/**
* Number of results on rerun
*/
rerunResultCount?: number;
}
export interface AggregatedResultsAnalysis {
duration?: any;
notReportedResultsByOutcome?: {
[key: number]: AggregatedResultsByOutcome;
};
previousContext?: TestResultsContext;
resultsByOutcome?: {
[key: number]: AggregatedResultsByOutcome;
};
resultsDifference?: AggregatedResultsDifference;
runSummaryByOutcome?: {
[key: number]: AggregatedRunsByOutcome;
};
runSummaryByState?: {
[key: number]: AggregatedRunsByState;
};
totalTests?: number;
}
export interface AggregatedResultsByOutcome {
count?: number;
duration?: any;
groupByField?: string;
groupByValue?: any;
outcome?: TestOutcome;
rerunResultCount?: number;
}
export interface AggregatedResultsDifference {
increaseInDuration?: any;
increaseInFailures?: number;
increaseInNonImpactedTests?: number;
increaseInOtherTests?: number;
increaseInPassedTests?: number;
increaseInTotalTests?: number;
}
export interface AggregatedRunsByOutcome {
outcome?: TestRunOutcome;
runsCount?: number;
}
export interface AggregatedRunsByState {
resultsByOutcome?: {
[key: number]: AggregatedResultsByOutcome;
};
runsCount?: number;
state?: TestRunState;
}
/**
* The types of test attachments.
*/
export declare enum AttachmentType {
/**
* Attachment type GeneralAttachment , use this as default type unless you have other type.
*/
GeneralAttachment = 0,
AfnStrip = 1,
BugFilingData = 2,
/**
* Attachment type CodeCoverage.
*/
CodeCoverage = 3,
IntermediateCollectorData = 4,
RunConfig = 5,
TestImpactDetails = 6,
TmiTestRunDeploymentFiles = 7,
TmiTestRunReverseDeploymentFiles = 8,
TmiTestResultDetail = 9,
TmiTestRunSummary = 10,
/**
* Attachment type ConsoleLog.
*/
ConsoleLog = 11
}
export interface BatchResponse {
error: string;
responses?: Response[];
status: string;
}
/**
* BuildConfiguration Details.
*/
export interface BuildConfiguration {
/**
* Branch name for which build is generated.
*/
branchName?: string;
/**
* BuildDefinitionId for build.
*/
buildDefinitionId?: number;
/**
* Build system.
*/
buildSystem?: string;
/**
* Build Creation Date.
*/
creationDate?: Date;
/**
* Build flavor (eg Build/Release).
*/
flavor?: string;
/**
* BuildConfiguration Id.
*/
id?: number;
/**
* Build Number.
*/
number?: string;
/**
* BuildConfiguration Platform.
*/
platform?: string;
/**
* Project associated with this BuildConfiguration.
*/
project?: ShallowReference;
/**
* Repository Guid for the Build.
*/
repositoryGuid?: string;
/**
* Repository Id.
*/
repositoryId?: number;
/**
* Repository Type (eg. TFSGit).
*/
repositoryType?: string;
/**
* Source Version(/first commit) for the build was triggered.
*/
sourceVersion?: string;
/**
* Target BranchName.
*/
targetBranchName?: string;
/**
* Build Uri.
*/
uri?: string;
}
/**
* Build Coverage Detail
*/
export interface BuildCoverage {
/**
* Code Coverage File Url
*/
codeCoverageFileUrl?: string;
/**
* Build Configuration
*/
configuration?: BuildConfiguration;
/**
* Last Error
*/
lastError?: string;
/**
* List of Modules
*/
modules?: ModuleCoverage[];
/**
* State
*/
state?: string;
}
/**
* Reference to a build.
*/
export interface BuildReference {
/**
* Branch name.
*/
branchName?: string;
/**
* Build system.
*/
buildSystem?: string;
/**
* Build Definition ID.
*/
definitionId?: number;
/**
* Build ID.
*/
id?: number;
/**
* Build Number.
*/
number?: string;
/**
* Repository ID.
*/
repositoryId?: string;
/**
* Build URI.
*/
uri?: string;
}
export interface BuildReference2 {
branchName?: string;
buildConfigurationId?: number;
buildDefinitionId?: number;
buildDeleted?: boolean;
buildFlavor?: string;
buildId?: number;
buildNumber?: string;
buildPlatform?: string;
buildSystem?: string;
buildUri?: string;
coverageId?: number;
createdDate?: Date;
projectId?: string;
repoId?: string;
repoType?: string;
sourceVersion?: string;
}
export interface BulkResultUpdateRequest {
projectName?: string;
requests?: ResultUpdateRequest[];
}
/**
* Detail About Clone Operation.
*/
export interface CloneOperationInformation {
/**
* Clone Statistics
*/
cloneStatistics?: CloneStatistics;
/**
* If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue
*/
completionDate?: Date;
/**
* DateTime when the operation was started
*/
creationDate?: Date;
/**
* Shallow reference of the destination
*/
destinationObject?: ShallowReference;
/**
* Shallow reference of the destination
*/
destinationPlan?: ShallowReference;
/**
* Shallow reference of the destination
*/
destinationProject?: ShallowReference;
/**
* If the operation has Failed, Message contains the reason for failure. Null otherwise.
*/
message?: string;
/**
* The ID of the operation
*/
opId?: number;
/**
* The type of the object generated as a result of the Clone operation
*/
resultObjectType?: ResultObjectType;
/**
* Shallow reference of the source
*/
sourceObject?: ShallowReference;
/**
* Shallow reference of the source
*/
sourcePlan?: ShallowReference;
/**
* Shallow reference of the source
*/
sourceProject?: ShallowReference;
/**
* Current state of the operation. When State reaches Succeeded or Failed, the operation is complete
*/
state?: CloneOperationState;
/**
* Url for getting the clone information
*/
url?: string;
}
/**
* Enum of type Clone Operation Type.
*/
export declare enum CloneOperationState {
/**
* value for Failed State
*/
Failed = 2,
/**
* value for Inprogress state
*/
InProgress = 1,
/**
* Value for Queued State
*/
Queued = 0,
/**
* value for Success state
*/
Succeeded = 3
}
/**
* Clone options for cloning the test suite.
*/
export interface CloneOptions {
/**
* If set to true requirements will be cloned
*/
cloneRequirements?: boolean;
/**
* copy all suites from a source plan
*/
copyAllSuites?: boolean;
/**
* copy ancestor hierarchy
*/
copyAncestorHierarchy?: boolean;
/**
* Name of the workitem type of the clone
*/
destinationWorkItemType?: string;
/**
* Key value pairs where the key value is overridden by the value.
*/
overrideParameters?: {
[key: string]: string;
};
/**
* Comment on the link that will link the new clone test case to the original Set null for no comment
*/
relatedLinkComment?: string;
}
/**
* Clone Statistics Details.
*/
export interface CloneStatistics {
/**
* Number of requirements cloned so far.
*/
clonedRequirementsCount?: number;
/**
* Number of shared steps cloned so far.
*/
clonedSharedStepsCount?: number;
/**
* Number of test cases cloned so far
*/
clonedTestCasesCount?: number;
/**
* Total number of requirements to be cloned
*/
totalRequirementsCount?: number;
/**
* Total number of test cases to be cloned
*/
totalTestCasesCount?: number;
}
export interface CloneTestCaseOptions {
/**
* If set to true, include the attachments
*/
includeAttachments?: boolean;
/**
* If set to true, include the links
*/
includeLinks?: boolean;
/**
* Comment on the link that will link the new clone test case to the original Set null for no comment
*/
relatedLinkComment?: string;
}
/**
* Represents the build configuration (platform, flavor) and coverage data for the build
*/
export interface CodeCoverageData {
/**
* Flavor of build for which data is retrieved/published
*/
buildFlavor: string;
/**
* Platform of build for which data is retrieved/published
*/
buildPlatform: string;
/**
* List of coverage data for the build
*/
coverageStats: CodeCoverageStatistics[];
}
/**
* Represents the code coverage statistics for a particular coverage label (modules, statements, blocks, etc.)
*/
export interface CodeCoverageStatistics {
/**
* Covered units
*/
covered: number;
/**
* Delta of coverage
*/
delta?: number;
/**
* Is delta valid
*/
isDeltaAvailable?: boolean;
/**
* Label of coverage data ("Blocks", "Statements", "Modules", etc.)
*/
label: string;
/**
* Position of label
*/
position: number;
/**
* Total units
*/
total: number;
}
/**
* Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build
*/
export interface CodeCoverageSummary {
/**
* Uri of build for which data is retrieved/published
*/
build: ShallowReference;
/**
* List of coverage data and details for the build
*/
coverageData?: CodeCoverageData[];
coverageDetailedSummaryStatus?: CoverageDetailedSummaryStatus;
/**
* Uri of build against which difference in coverage is computed
*/
deltaBuild?: ShallowReference;
/**
* Uri of build against which difference in coverage is computed
*/
status?: CoverageSummaryStatus;
}
export interface CodeCoverageSummary2 {
buildConfigurationId?: number;
covered?: number;
label?: string;
position?: number;
projectId?: string;
total?: number;
}
export interface Coverage2 {
coverageId?: number;
dateCreated?: Date;
dateModified?: Date;
lastError?: string;
state?: number;
}
/**
* Represents status of code coverage summary for a build
*/
export declare enum CoverageDetailedSummaryStatus {
/**
* No coverage status
*/
None = 0,
/**
* The summary evaluation is in progress
*/
InProgress = 1,
/**
* The summary evaluation is finalized and won't change
*/
Finalized = 2,
/**
* The summary evaluation is pending
*/
Pending = 3,
/**
* Summary evaluation may be ongoing but another merge has been requested.
*/
UpdateRequestQueued = 4,
/**
* No coverage modules found
*/
NoModulesFound = 5,
/**
* Number of Files exceeded
*/
NumberOfFilesExceeded = 6,
/**
* TNo Input Files
*/
NoInputFiles = 7,
/**
* Build got cancelled by user
*/
BuildCancelled = 8,
/**
* Coverage Jobs failed
*/
FailedJobs = 9,
/**
* Module merge Timeout
*/
ModuleMergeJobTimeout = 10,
/**
* Coverage successfully completed
*/
CodeCoverageSuccess = 11,
/**
* Invalid Build Configuration
*/
InvalidBuildConfiguration = 12,
/**
* Coverage Analyzer Build not found
*/
CoverageAnalyzerBuildNotFound = 13,
/**
* Failed to requeue the build
*/
FailedToRequeue = 14,
/**
* Build got Bailed out
*/
BuildBailedOut = 15,
/**
* No Code coverage configured
*/
NoCodeCoverageTask = 16,
/**
* CoverageMerge Job failed
*/
MergeJobFailed = 17,
/**
* CoverageMergeInvoker Job failed
*/
MergeInvokerJobFailed = 18,
/**
* CoverageMonitor Job failed
*/
MonitorJobFailed = 19,
/**
* CoverageMergeInvoker Job timeout
*/
ModuleMergeInvokerJobTimeout = 20,
/**
* CoverageMonitor Job timeout
*/
MonitorJobTimeout = 21,
/**
* Invalid Coverage Input file
*/
InvalidCoverageInput = 22
}
/**
* Used to choose which coverage data is returned by a QueryXXXCoverage() call.
*/
export declare enum CoverageQueryFlags {
/**
* If set, the Coverage.Modules property will be populated.
*/
Modules = 1,
/**
* If set, the ModuleCoverage.Functions properties will be populated.
*/
Functions = 2,
/**
* If set, the ModuleCoverage.CoverageData field will be populated.
*/
BlockData = 4
}
export interface CoverageStatistics {
blocksCovered?: number;
blocksNotCovered?: number;
linesCovered?: number;
linesNotCovered?: number;
linesPartiallyCovered?: number;
}
export declare enum CoverageStatus {
Covered = 0,
NotCovered = 1,
PartiallyCovered = 2
}
/**
* Represents status of code coverage summary for a build
*/
export declare enum CoverageSummaryStatus {
/**
* No coverage status
*/
None = 0,
/**
* The summary evaluation is in progress
*/
InProgress = 1,
/**
* The summary evaluation for the previous request is completed. Summary can change in future
*/
Completed = 2,
/**
* The summary evaluation is finalized and won't change
*/
Finalized = 3,
/**
* The summary evaluation is pending
*/
Pending = 4,
/**
* Summary evaluation may be ongoing but another merge has been requested.
*/
UpdateRequestQueued = 5
}
export interface CreateTestMessageLogEntryRequest {
projectName?: string;
testMessageLogEntry?: TestMessageLogEntry[];
testRunId?: number;
}
export interface CreateTestResultsRequest {
projectName?: string;
results?: LegacyTestCaseResult[];
}
export interface CreateTestRunRequest {
projectName?: string;
results?: LegacyTestCaseResult[];
testRun?: LegacyTestRun;
testSettings?: LegacyTestSettings;
}
/**
* A custom field information. Allowed Key : Value pairs - ( AttemptId: int value, IsTestResultFlaky: bool)
*/
export interface CustomTestField {
/**
* Field Name.
*/
fieldName: string;
/**
* Field value.
*/
value: any;
}
export interface CustomTestFieldDefinition {
fieldId?: number;
fieldName: string;
fieldType: CustomTestFieldType;
scope: CustomTestFieldScope;
}
export declare enum CustomTestFieldScope {
None = 0,
TestRun = 1,
TestResult = 2,
System = 4,
All = 7
}
export declare enum CustomTestFieldType {
Bit = 2,
DateTime = 4,
Int = 8,
Float = 6,
String = 12,
Guid = 14
}
export interface DatedTestFieldData {
date?: Date;
value?: TestFieldData;
}
export interface DefaultAfnStripBinding {
testCaseId?: number;
testResultId?: number;
testRunId?: number;
}
export interface DeleteTestRunRequest {
projectName?: string;
testRunIds?: number[];
}
export interface DownloadAttachmentsRequest {
ids?: number[];
lengths?: number[];
}
/**
* This is a temporary class to provide the details for the test run environment.
*/
export interface DtlEnvironmentDetails {
csmContent: string;
csmParameters?: string;
subscriptionName?: string;
}
/**
* Failing since information of a test result.
*/
export interface FailingSince {
/**
* Build reference since failing.
*/
build?: BuildReference;
/**
* Time since failing(UTC).
*/
date: Date;
/**
* Release reference since failing.
*/
release?: ReleaseReference;
}
export interface FetchTestResultsRequest {
idAndRevs?: TestCaseResultIdAndRev[];
includeActionResults?: boolean;
projectName?: string;
}
export interface FetchTestResultsResponse {
actionResults?: TestActionResult[];
attachments?: TestResultAttachment[];
deletedIds?: LegacyTestCaseResultIdentifier[];
results?: LegacyTestCaseResult[];
testParameters?: TestResultParameter[];
}
export interface FieldDetailsForTestResults {
/**
* Group by field name
*/
fieldName?: string;
/**
* Group by field values
*/
groupsForField?: any[];
}
export interface FileCoverage {
/**
* List of line blocks along with their coverage status
*/
lineBlocksCoverage?: LineBlockCoverage[];
/**
* File path for which coverage information is sought for
*/
path: string;
}
export interface FileCoverageData {
coverageStatistics?: CoverageStatistics;
name?: string;
}
export interface FileCoverageRequest {
filePath: string;
pullRequestBaseIterationId: number;
pullRequestId: number;
pullRequestIterationId: number;
repoId: string;
}
export interface FilterPointQuery {
planId: number;
pointIds: number[];
pointOutcome: number[];
resultState: number[];
}
export interface FlakyDetection {
/**
* FlakyDetectionPipelines defines Pipelines for Detection.
*/
flakyDetectionPipelines?: FlakyDetectionPipelines;
/**
* FlakyDetectionType defines Detection type i.e. 1. System or 2. Manual.
*/
flakyDetectionType: FlakyDetectionType;
}
export interface FlakyDetectionPipelines {
/**
* AllowedPipelines - List All Pipelines allowed for detection.
*/
allowedPipelines?: number[];
/**
* IsAllPipelinesAllowed if users configure all system's pipelines.
*/
isAllPipelinesAllowed: boolean;
}
export declare enum FlakyDetectionType {
/**
* Custom defines manual detection type.
*/
Custom = 1,
/**
* Defines System detection type.
*/
System = 2
}
export interface FlakySettings {
/**
* FlakyDetection defines types of detection.
*/
flakyDetection?: FlakyDetection;
/**
* FlakyInSummaryReport defines flaky data should show in summary report or not.
*/
flakyInSummaryReport?: boolean;
/**
* IsFlakyBugCreated defines if there is any bug that has been created with flaky testresult.
*/
isFlakyBugCreated?: boolean;
/**
* ManualMarkUnmarkFlaky defines manual marking unmarking of flaky testcase.
*/
manualMarkUnmarkFlaky?: boolean;
}
export interface FolderCoverageData {
coverageStatistics?: CoverageStatistics;
files?: FileCoverageData[];
folders?: FolderCoverageData[];
name?: string;
}
export interface FunctionCoverage {
class?: string;
name?: string;
namespace?: string;
sourceFile?: string;
statistics?: CoverageStatistics;
}
export interface FunctionCoverage2 {
blocksCovered?: number;
blocksNotCovered?: number;
class?: string;
coverageId?: number;
functionId?: number;
linesCovered?: number;
linesNotCovered?: number;
linesPartiallyCovered?: number;
moduleId?: number;
name?: string;
namespace?: string;
sourceFile?: string;
}
export interface HttpPostedTcmAttachment {
attachmentContent?: string;
contentLength?: number;
contentType?: string;
fileName?: string;
}
/**
* Job in pipeline. This is related to matrixing in YAML.
*/
export interface JobReference {
/**
* Attempt number of the job
*/
attempt?: number;
/**
* 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.
*/
jobName?: string;
}
/**
* Last result details of test point.
*/
export interface LastResultDetails {
/**
* Completed date of last result.
*/
dateCompleted?: Date;
/**
* Duration of the last result in milliseconds.
*/
duration?: number;
/**
* The user who executed the last result.
*/
runBy?: VSSInterfaces.IdentityRef;
}
export interface LegacyBuildConfiguration {
branchName?: string;
buildConfigurationId?: number;
buildDefinitionId?: number;
buildDefinitionName?: string;
buildFlavor?: string;
buildId?: number;
buildNumber?: string;
buildPlatform?: string;
buildQuality?: string;
buildSystem?: string;
buildUri?: string;
completedDate?: Date;
createdDate?: Date;
oldBuildConfigurationId?: number;
repositoryId?: string;
repositoryType?: string;
sourceVersion?: string;
teamProjectName?: string;
}
export interface LegacyReleaseReference {
attempt?: number;
environmentCreationDate?: Date;
primaryArtifactBuildId?: number;
primaryArtifactProjectId?: string;
primaryArtifactType?: string;
releaseCreationDate?: Date;
releaseDefId?: number;
releaseEnvDefId?: number;
releaseEnvId?: number;
releaseEnvName?: string;
releaseEnvUri?: string;
releaseId?: number;
releaseName?: string;
releaseRefId?: number;
releaseUri?: string;
}
export interface LegacyTestCaseResult {
afnStripId?: number;
areaId?: number;
areaUri?: string;
automatedTestId?: string;
automatedTestName?: string;
automatedTestStorage?: string;
automatedTestType?: string;
automatedTestTypeId?: string;
buildNumber?: string;
buildReference?: LegacyBuildConfiguration;
comment?: string;
computerName?: string;
configurationId?: number;
configurationName?: string;
creationDate?: Date;
customFields?: TestExtensionField[];
dateCompleted?: Date;
dateStarted?: Date;
duration?: number;
errorMessage?: string;
failingSince?: FailingSince;
failureType?: number;
id?: LegacyTestCaseResultIdentifier;
isRerun?: boolean;
lastUpdated?: Date;
lastUpdatedBy?: string;
lastUpdatedByName?: string;
outcome?: number;
owner?: string;
ownerName?: string;
priority?: number;
releaseReference?: LegacyReleaseReference;
resetCount?: number;
resolutionStateId?: number;
resultGroupType?: ResultGroupType;
revision?: number;
runBy?: string;
runByName?: string;
sequenceId?: number;
stackTrace?: TestExtensionField;
state?: number;
subResultCount?: number;
suiteName?: string;
testCaseArea?: string;
testCaseAreaUri?: string;
testCaseId?: number;
testCaseReferenceId?: number;
testCaseRevision?: number;
testCaseTitle?: string;
testPlanId?: number;
testPointId?: number;
testResultId?: number;
testRunId?: number;
testRunTitle?: string;
testSuiteId?: number;
}
export interface LegacyTestCaseResultIdentifier {
areaUri?: string;
testResultId?: number;
testRunId?: number;
}
export interface LegacyTestRun {
bugsCount?: number;
buildConfigurationId?: number;
buildFlavor?: string;
buildNumber?: string;
buildPlatform?: string;
buildReference?: LegacyBuildConfiguration;
buildUri?: string;
comment?: string;
completeDate?: Date;
configurationIds?: number[];
controller?: string;
creationDate?: Date;
csmContent?: string;
csmParameters?: string;
customFields?: TestExtensionField[];
dropLocation?: string;
dtlAutEnvironment?: ShallowReference;
dtlTestEnvironment?: ShallowReference;
dueDate?: Date;
errorMessage?: string;
filter?: RunFilter;
incompleteTests?: number;
isAutomated?: boolean;
isBvt?: boolean;
iteration?: string;
iterationId?: number;
lastUpdated?: Date;
lastUpdatedBy?: string;
lastUpdatedByName?: string;
legacySharePath?: string;
notApplicableTests?: number;
owner?: string;
ownerName?: string;
passedTests?: number;
postProcessState?: number;
publicTestSettingsId?: number;
releaseEnvironmentUri?: string;
releaseReference?: LegacyReleaseReference;
releaseUri?: string;
revision?: number;
rowVersion?: number[];
runHasDtlEnvironment?: boolean;
runTimeout?: any;
serviceVersion?: string;
sourceWorkflow?: string;
startDate?: Date;
state?: number;
subscriptionName?: string;
substate?: number;
teamProject?: string;
teamProjectUri?: string;
testConfigurationsMapping?: string;
testEnvironmentId?: string;
testMessageLogEntries?: TestMessageLogDetails[];
testMessageLogId?: number;
testPlanId?: number;
testRunId?: number;
testRunStatistics?: LegacyTestRunStatistic[];
testSettingsId?: number;
title?: string;
totalTests?: number;
type?: number;
unanalyzedTests?: number;
version?: number;
}
export interface LegacyTestRunStatistic {
count?: number;
outcome?: number;
resolutionState?: TestResolutionState;
state?: number;
testRunId?: number;
}
export interface LegacyTestSettings {
areaId?: number;
areaPath?: string;
createdBy?: string;
createdByName?: string;
createdDate?: Date;
description?: string;
id?: number;
isAutomated?: boolean;
isPublic?: boolean;
lastUpdated?: Date;
lastUpdatedBy?: string;
lastUpdatedByName?: string;
machineRoles?: TestSettingsMachineRole[];
name?: string;
revision?: number;
settings?: string;
teamProjectUri?: string;
}
export interface LineBlockCoverage {
/**
* End of line block
*/
end: number;
/**
* Start of line block
*/
start: number;
/**
* Coverage status. Covered: 0, NotCovered: 1, PartiallyCovered: 2
*/
status: number;
}
/**
* Links
*/
export interface Link {
/**
* Display Name
*/
displayName?: string;
/**
* Link Operation Type Valid values = (Open, WebService)
*/
operationType?: string;
/**
* Link type (maps to enum value; see parent object for acceptable values)
*/
type: string;
/**
* Link url
*/
url: string;
}
export interface LinkedWorkItemsQuery {
automatedTestNames?: string[];
planId?: number;
pointIds?: number[];
suiteIds?: number[];
testCaseIds?: number[];
workItemCategory?: string;
}
export interface LinkedWorkItemsQueryResult {
automatedTestName?: string;
planId?: number;
pointId?: number;
suiteId?: number;
testCaseId?: number;
workItems?: WorkItemReference[];
}
/**
* Test summary metrics.
*/
export declare enum Metrics {
/**
* To get results of all matrix.
*/
All = 1,
/**
* Get results summary by results outcome
*/
ResultSummary = 2,
/**
* Get results analysis which include failure analysis, increase/decrease in results count analysis.
*/
ResultsAnalysis = 3,
/**
* Get runs summary
*/
RunSummary = 4
}
export interface ModuleCoverage {
blockCount?: number;
blockData?: number[];
/**
* Code Coverage File Url
*/
fileUrl?: string;
functions?: FunctionCoverage[];
name?: string;
signature?: string;
signatureAge?: number;
statistics?: CoverageStatistics;
}
export interface ModuleCoverage2 {
blockCount?: number;
blockData?: number[];
blockDataLength?: number;
blocksCovered?: number;
blocksNotCovered?: number;
coverageFileUrl?: string;
coverageId?: number;
linesCovered?: number;
linesNotCovered?: number;
linesPartiallyCovered?: number;
moduleId?: number;
name?: string;
signature?: string;
signatureAge?: number;
}
/**
* Name value pair
*/
export interface NameValuePair {
/**
* Name
*/
name?: string;
/**
* Value
*/
value?: string;
}
export interface NewTestResultLoggingSettings {
/**
* LogNewTests defines whether or not we will record new test cases coming into the system
*/
logNewTests?: boolean;
}
export declare enum OperationType {
Add = 1,
Delete = 2
}
/**
* Phase in pipeline
*/
export interface PhaseReference {
/**
* Attempt number of the phase
*/
attempt?: number;
/**
* Name of the phase. Maximum supported length for name is 256 character.
*/
phaseName?: string;
}
/**
* Pipeline reference
*/
export interface PipelineReference {
/**
* Reference of the job
*/
jobReference?: JobReference;
/**
* Reference of the phase.
*/
phaseReference?: PhaseReference;
/**
* Reference of the BuildDefinitionId.
*/
pipelineDefinitionId?: number;
/**
* Reference of the pipeline with which this pipeline instance is related.
*/
pipelineId: number;
/**
* Reference of the stage.
*/
stageReference?: StageReference;
}
/**
* Test summary of a pipeline instance.
*/
export interface PipelineTestMetrics {
/**
* Reference of Pipeline instance for which test summary is calculated.
*/
currentContext?: PipelineReference;
/**
* This is the return value for metric ResultsAnalysis Results insights which include failure analysis, increase/decrease in results count analysis.
*/
resultsAnalysis?: ResultsAnalysis;
/**
* This is the return value for metric ResultSummary Results summary based on results outcome.
*/
resultSummary?: ResultSummary;
/**
* This is the return value for metric RunSummary Run summary.
*/
runSummary?: RunSummary;
/**
* Summary at child node.
*/
summaryAtChild?: PipelineTestMetrics[];
}
/**
* A model class used for creating and updating test plans.
*/
export interface PlanUpdateModel {
/**
* Area path to which the test plan belongs. This should be set to area path of the team that works on this test plan.
*/
area?: ShallowReference;
automatedTestEnvironment?: TestEnvironment;
automatedTestSettings?: TestSettings;
/**
* Build ID of the build whose quality is tested by the tests in this test plan. For automated testing, this build ID is used to find the test binaries that contain automated test methods.
*/
build?: ShallowReference;
/**
* The Build Definition that generates a build associated with this test plan.
*/
buildDefinition?: ShallowReference;
/**
* IDs of configurations to be applied when new test suites and test cases are added to the test plan.
*/
configurationIds?: number[];
/**
* Description of the test plan.
*/
description?: string;
/**
* End date for the test plan.
*/
endDate?: string;
/**
* Iteration path assigned to the test plan. This indicates when the target iteration by which the testing in this plan is supposed to be complete and the product is ready to be released.
*/
iteration?: string;
manualTestEnvironment?: TestEnvironment;
manualTestSettings?: TestSettings;
/**
* Name of the test plan.
*/
name?: string;
/**
* Owner of the test plan.
*/
owner?: VSSInterfaces.IdentityRef;
/**
* Release Environment to be used to deploy the build and run automated tests from this test plan.
*/
releaseEnvironmentDefinition?: ReleaseEnvironmentDefinitionReference;
/**
* Start date for the test plan.
*/
startDate?: string;
/**
* State of the test plan.
*/
state?: string;
status?: string;
/**
* Test Outcome settings
*/
testOutcomeSettings?: TestOutcomeSettings;
}
/**
* Adding test cases to a suite creates one of more test points based on the default configurations and testers assigned to the test suite. PointAssignment is the list of test points that were created for each of the test cases that were added to the test suite.
*/
export interface PointAssignment {
/**
* Configuration that was assigned to the test case.
*/
configuration?: ShallowReference;
/**
* Tester that was assigned to the test case
*/
tester?: VSSInterfaces.IdentityRef;
}
export interface PointLastResult {
lastUpdatedDate?: Date;
pointId?: number;
}
/**
* Filter class for test point.
*/
export interface PointsFilter {
/**
* List of Configurations for filtering.
*/
configurationNames?: string[];
/**
* List of test case id for filtering.
*/
testcaseIds?: number[];
/**
* List of tester for filtering.
*/
testers?: VSSInterfaces.IdentityRef[];
}
export interface PointsReference2 {
planId?: number;
pointId?: number;
}
export interface PointsResults2 {
changeNumber?: number;
lastFailureType?: number;
lastResolutionStateId?: number;
lastResultOutcome?: number;
lastResultState?: number;
lastTestResultId?: number;
lastTestRunId?: number;
lastUpdated?: Date;
lastUpdatedBy?: string;
planId?: number;
pointId?: number;
}
/**
* Model to update test point.
*/
export interface PointUpdateModel {
/**
* Outcome to update.
*/
outcome?: string;
/**
* Reset test point to active.
*/
resetToActive?: boolean;
/**
* Tester to update. Type IdentityRef.
*/
tester?: VSSInterfaces.IdentityRef;
}
/**
* Test point workitem property.
*/
export interface PointWorkItemProperty {
/**
* key value pair of test point work item property.
*/
workItem: {
key: string;
value: any;
};
}
/**
* The class to represent a Generic store for test session data.
*/
export interface PropertyBag {
/**
* Generic store for test session data
*/
bag?: {
[key: string]: string;
};
}
export interface QueryByPointRequest {
projectName?: string;
testPlanId?: number;
testPointId?: number;
}
export interface QueryByRunRequest {
includeActionResults?: boolean;
outcome?: number;
owner?: string;
pageSize?: number;
projectName?: string;
state?: number;
testRunId?: number;
}
export interface QueryModel {
query: string;
}
export interface QueryTestActionResultRequest {
identifier?: LegacyTestCaseResultIdentifier;
projectName?: string;
}
export interface QueryTestActionResultResponse {
testActionResults?: TestActionResult[];
testAttachments?: TestResultAttachment[];
testResultParameters?: TestResultParameter[];
}
export interface QueryTestMessageLogEntryRequest {
projectName?: string;
testMessageLogId?: number;
testRunId?: number;
}
export interface QueryTestRuns2Request {
includeStatistics?: boolean;
query?: ResultsStoreQuery;
}
export interface QueryTestRunsRequest {
buildUri?: string;
owner?: string;
planId?: number;
skip?: number;
teamProjectName?: string;
testRunId?: number;
top?: number;
}
export interface QueryTestRunStatsRequest {
teamProjectName?: string;
testRunId?: number;
}
/**
* Reference to release environment resource.
*/
export interface ReleaseEnvironmentDefinitionReference {
/**
* ID of the release definition that contains the release environment definition.
*/
definitionId?: number;
/**
* ID of the release environment definition.
*/
environmentDefinitionId?: number;
}
/**
* Reference to a release.
*/
export interface ReleaseReference {
/**
* Number of Release Attempt.
*/
attempt?: number;
/**
* Release Creation Date(UTC).
*/
creationDate?: Date;
/**
* Release definition ID.
*/
definitionId?: number;
/**
* Environment creation Date(UTC).
*/
environmentCreationDate?: Date;
/**
* Release environment definition ID.
*/
environmentDefinitionId?: number;
/**
* Release environment definition name.
*/
environmentDefinitionName?: string;
/**
* Release environment ID.
*/
environmentId?: number;
/**
* Release environment name.
*/
environmentName?: string;
/**
* Release ID.
*/
id?: number;
/**
* Release name.
*/
name?: string;
}
export interface ReleaseReference2 {
attempt?: number;
environmentCreationDate?: Date;
projectId?: string;
releaseCreationDate?: Date;
releaseDefId?: number;
releaseEnvDefId?: number;
releaseEnvId?: number;
releaseEnvName?: string;
releaseEnvUri?: string;
releaseId?: number;
releaseName?: string;
releaseRefId?: number;
releaseUri?: string;
}
export interface RequirementsToTestsMapping2 {
createdBy?: string;
creationDate?: Date;
deletedBy?: string;
deletionDate?: Date;
isMigratedToWIT?: boolean;
projectId?: string;
testMetadataId?: number;
workItemId?: number;
}
export interface ResetTestResultsRequest {
ids?: LegacyTestCaseResultIdentifier[];
projectName?: string;
}
export interface Response {
error?: string;
id?: string;
status?: string;
url?: string;
}
/**
* Additional details with test result
*/
export declare enum ResultDetails {
/**
* Core fields of test result. Core fields includes State, Outcome, Priority, AutomatedTestName, AutomatedTestStorage, Comments, ErrorMessage etc.
*/
None = 0,
/**
* Test iteration details in a test result.
*/
Iterations = 1,
/**
* Workitems associated with a test result.
*/
WorkItems = 2,
/**
* Subresults in a test result.
*/
SubResults = 4,
/**
* Point and plan detail in a test result.
*/
Point = 8
}
/**
* Hierarchy type of the result/subresults.
*/
export declare enum ResultGroupType {
/**
* Leaf node of test result.
*/
None = 0,
/**
* Hierarchy type of test result.
*/
Rerun = 1,
/**
* Hierarchy type of test result.
*/
DataDriven = 2,
/**
* Hierarchy type of test result.
*/
OrderedTest = 3,
/**
* Unknown hierarchy type.
*/
Generic = 4
}
export declare enum ResultMetadata {
/**
* Rerun metadata
*/
Rerun = 1,
/**
* Flaky metadata
*/
Flaky = 2
}
/**
* Additional details with test result metadata
*/
export declare enum ResultMetaDataDetails {
/**
* Core fields of test result metadata.
*/
None = 0,
/**
* Test FlakyIdentifiers details in test result metadata.
*/
FlakyIdentifiers = 1
}
/**
* The top level entity that is being cloned as part of a Clone operation
*/
export declare enum ResultObjectType {
/**
* Suite Clone
*/
TestSuite = 0,
/**
* Plan Clone
*/
TestPlan = 1
}
/**
* Test result retention settings
*/
export interface ResultRetentionSettings {
/**
* Automated test result retention duration in days
*/
automatedResultsRetentionDuration: number;
/**
* Last Updated by identity
*/
lastUpdatedBy?: VSSInterfaces.IdentityRef;
/**
* Last updated date
*/
lastUpdatedDate?: Date;
/**
* Manual test result retention duration in days
*/
manualResultsRetentionDuration: number;
}
/**
* Results insights for runs with state completed and NeedInvestigation.
*/
export interface ResultsAnalysis {
/**
* Reference of pipeline instance from which to compare the results.
*/
previousContext?: PipelineReference;
/**
* Increase/Decrease in counts of results for a different outcome with respect to PreviousContext.
*/
resultsDifference?: AggregatedResultsDifference;
/**
* Failure analysis of results with respect to PreviousContext
*/
testFailuresAnalysis?: TestResultFailuresAnalysis;
}
export interface ResultsByQueryRequest {
pageSize?: number;
query?: ResultsStoreQuery;
}
export interface ResultsByQueryResponse {
excessIds?: LegacyTestCaseResultIdentifier[];
testResults?: LegacyTestCaseResult[];
}
export interface ResultsFilter {
automatedTestName: string;
branch?: string;
executedIn?: Service;
groupBy?: string;
maxCompleteDate?: Date;
resultsCount?: number;
testCaseId?: number;
testCaseReferenceIds?: number[];
testPlanId?: number;
testPointIds?: number[];
testResultsContext?: TestResultsContext;
trendDays?: number;
}
export interface ResultsStoreQuery {
dayPrecision?: boolean;
queryText?: string;
teamProjectName?: string;
timeZone?: string;
}
/**
* Result summary by the outcome of test results.
*/
export interface ResultsSummaryByOutcome {
/**
* Aggregated result details for each test result outcome.
*/
aggregatedResultDetailsByOutcome?: {
[key: number]: AggregatedResultDetailsByOutcome;
};
/**
* Time taken by results.
*/
duration?: any;
/**
* Total number of not reported test results.
*/
notReportedTestCount?: number;
/**
* Total number of test results. (It includes NotImpacted test results as well which need to exclude while calculating pass/fail test result percentage).
*/
totalTestCount?: number;
}
/**
* Summary of results for a pipeline instance.
*/
export interface ResultSummary {
/**
* Result summary of pipeline, group by TestRun state.
*/
resultSummaryByRunState?: {
[key: number]: ResultsSummaryByOutcome;
};
}
export interface ResultUpdateRequest {
actionResultDeletes?: TestActionResult[];
actionResults?: TestActionResult[];
attachmentDeletes?: TestResultAttachmentIdentity[];
attachments?: TestResultAttachment[];
parameterDeletes?: TestResultParameter[];
parameters?: TestResultParameter[];
testCaseResult?: LegacyTestCaseResult;
testResultId?: number;
testRunId?: number;
}
export interface ResultUpdateRequestModel {
actionResultDeletes: TestActionResultModel[];
actionResults: TestActionResultModel[];
parameterDeletes: TestResultParameterModel[];
parameters: TestResultParameterModel[];
testCaseResult: TestCaseResultUpdateModel;
}
export interface ResultUpdateResponse {
attachmentIds?: number[];
lastUpdated?: Date;
lastUpdatedBy?: string;
lastUpdatedByName?: string;
maxReservedSubResultId?: number;
revision?: number;
testPlanId?: number;
testResultId?: number;
}
export interface ResultUpdateResponseModel {
revision: number;
}
/**
* Test run create details.
*/
export interface RunCreateModel {
/**
* true if test run is automated, false otherwise. By default it will be false.
*/
automated?: boolean;
/**
* An abstracted reference to the build that it belongs.
*/
build?: ShallowReference;
/**
* Drop location of the build used for test run.
*/
buildDropLocation?: string;
/**
* Flavor of the build used for test run. (E.g: Release, Debug)
*/
buildFlavor?: string;
/**
* Platform of the build used for test run. (E.g.: x86, amd64)
*/
buildPlatform?: string;
/**
* BuildReference of the test run.
*/
buildReference?: BuildConfiguration;
/**
* Comments entered by those analyzing the run.
*/
comment?: string;
/**
* Completed date time of the run.
*/
completeDate?: string;
/**
* IDs of the test configurations associated with the run.
*/
configurationIds: number[];
/**
* Name of the test controller used for automated run.
*/
controller?: string;
/**
* Additional properties of test Run. Value of the CustomField cannot be more than 1KB.
*/
customTestFields?: CustomTestField[];
/**
* An abstracted reference to DtlAutEnvironment.
*/
dtlAutEnvironment?: ShallowReference;
/**
* An abstracted reference to DtlTestEnvironment.
*/
dtlTestEnvironment?: ShallowReference;
/**
* Due date and time for test run.
*/
dueDate?: string;
environmentDetails?: DtlEnvironmentDetails;
/**
* Error message associated with the run.
*/
errorMessage?: string;
/**
* Filter used for discovering the Run.
*/
filter?: RunFilter;
/**
* The iteration in which to create the run. Root iteration of the team project will be default
*/
iteration?: string;
/**
* Name of the test run.
*/
name: string;
/**
* Display name of the owner of the run.
*/
owner?: VSSInterfaces.IdentityRef;
/**
* Reference of the pipeline to which this test run belongs. PipelineReference.PipelineId should be equal to RunCreateModel.Build.Id
*/
pipelineReference?: PipelineReference;
/**
* An abstracted reference to the plan that it belongs.
*/
plan: ShallowReference;
/**
* IDs of the test points to use in the run.
*/
pointIds?: number[];
/**
* URI of release environment associated with the run.
*/
releaseEnvironmentUri?: string;
/**
* Reference to release associated with test run.
*/
releaseReference?: ReleaseReference;
/**
* URI of release associated with the run.
*/
releaseUri?: string;
/**
* Run summary for run Type = NoConfigRun.
*/
runSummary?: RunSummaryModel[];
/**
* Timespan till the run times out.
*/
runTimeout?: any;
/**
* SourceWorkFlow(CI/CD) of the test run.
*/
sourceWorkflow?: string;
/**
* Start date time of the run.
*/
startDate?: string;
/**
* The state of the run. Type TestRunState Valid states - NotStarted, InProgress, Waiting
*/
state?: string;
/**
* Tags to attach with the test run, maximum of 5 tags can be added to run.
*/
tags?: TestTag[];
/**
* TestConfigurationMapping of the test run.
*/
testConfigurationsMapping?: string;
/**
* ID of the test environment associated with the run.
*/
testEnvironmentId?: string;
/**
* An abstracted reference to the test settings resource.
*/
testSettings?: ShallowReference;
/**
* Type of the run(RunType) Valid Values : (Unspecified, Normal, Blocking, Web, MtrRunInitiatedFromWeb, RunWithDtlEnv, NoConfigRun)
*/
type?: string;
}
/**
* This class is used to provide the filters used for discovery
*/
export interface RunFilter {
/**
* filter for the test case sources (test containers)
*/
sourceFilter: string;
/**
* filter for the test cases
*/
testCaseFilter?: string;
}
/**
* Test run statistics per outcome.
*/
export interface RunStatistic {
/**
* Test result count fo the given outcome.
*/
count: number;
/**
* Test result outcome
*/
outcome: string;
/**
* Test run Resolution State.
*/
resolutionState?: TestResolutionState;
/**
* ResultMetadata for the given outcome/count.
*/
resultMetadata?: ResultMetadata;
/**
* State of the test run
*/
state: string;
}
/**
* Summary of runs for a pipeline instance.
*/
export interface RunSummary {
/**
* Total time taken by runs with state completed and NeedInvestigation.
*/
duration?: any;
/**
* NoConfig runs count.
*/
noConfigRunsCount?: number;
/**
* Runs count by outcome for runs with state completed and NeedInvestigation runs.
*/
runSummaryByOutcome?: {
[key: number]: number;
};
/**
* Runs count by state.
*/
runSummaryByState?: {
[key: number]: number;
};
/**
* Total runs count.
*/
totalRunsCount?: number;
}
/**
* Run summary for each output type of test.
*/
export interface RunSummaryModel {
/**
* Total time taken in milliseconds.
*/
duration?: number;
/**
* Number of results for Outcome TestOutcome
*/
resultCount: number;
/**
* Summary is based on outcome
*/
testOutcome: TestOutcome;
}
export declare enum RunType {
/**
* Only used during an update to