Test Suite Clone - Clone Test Suite

Clone test suite

POST https://dev.azure.com/{organization}/{project}/_apis/testplan/Suites/CloneOperation?api-version=5.0-preview.1
POST https://dev.azure.com/{organization}/{project}/_apis/testplan/Suites/CloneOperation?deepClone={deepClone}&api-version=5.0-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '5.0-preview.1' to use this version of the api.

deepClone
query

boolean

Clones all the associated test cases as well. False by default.

Request Body

Name Type Description
cloneOptions

CloneOptions

Test suite Clone options

destinationTestSuite

DestinationTestSuiteInfo

Destination Test Suite

sourceTestSuite

SourceTestSuiteInfo

Source Test Suite

Responses

Name Type Description
200 OK

CloneTestSuiteOperationInformation

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.test_write Grants the ability to read, create, and update test plans, cases, results and other test management related artifacts.

Definitions

Name Description
CloneOperationCommonResponse

Clone Operation Response

CloneOperationState

Clone operation state

CloneOptions
CloneStatistics
CloneTestSuiteOperationInformation

Test Suite clone information

CloneTestSuiteParams

Test Suite clone operation parameters

DestinationTestSuiteInfo

Destination Test Suite information for clone operation

ProjectState

Project state.

ProjectVisibility

Project visibility.

ReferenceLinks

The class to represent a collection of REST reference links.

SourceTestSuiteInfo

Source Test Suite information for clone operation

TeamProjectReference

Represents a shallow reference to a TeamProject.

TestSuiteReferenceWithProject

Test Suite Reference

CloneOperationCommonResponse

Clone Operation Response

Name Type Description
cloneStatistics

CloneStatistics

Statistics related to the clone operation

completionDate

string

Completion data of the operation

creationDate

string

Creation data of the operation

links

ReferenceLinks

Reference links

message

string

Message related to the job

opId

integer

Clone operation Id

state

CloneOperationState

Clone operation state

CloneOperationState

Clone operation state

Name Type Description
failed

string

value for Failed State

inProgress

string

value for Inprogress state

queued

string

Value for Queued State

succeeded

string

value for Success state

CloneOptions

Name Type Description
cloneRequirements

boolean

If set to true requirements will be cloned

copyAllSuites

boolean

copy all suites from a source plan

copyAncestorHierarchy

boolean

copy ancestor hieracrchy

destinationWorkItemType

string

Name of the workitem type of the clone

overrideParameters

object

Key value pairs where the key value is overridden by the value.

relatedLinkComment

string

Comment on the link that will link the new clone test case to the original Set null for no comment

CloneStatistics

Name Type Description
clonedRequirementsCount

integer

Number of Requirments cloned so far.

clonedSharedStepsCount

integer

Number of shared steps cloned so far.

clonedTestCasesCount

integer

Number of test cases cloned so far

totalRequirementsCount

integer

Total number of requirements to be cloned

totalTestCasesCount

integer

Total number of test cases to be cloned

CloneTestSuiteOperationInformation

Test Suite clone information

Name Type Description
cloneOperationResponse

CloneOperationCommonResponse

Clone Operation Response

cloneOptions

CloneOptions

Test Suite Clone options

clonedTestSuite

TestSuiteReferenceWithProject

Newly cloned Test Suite

destinationTestSuite

TestSuiteReferenceWithProject

Destination Test Suite

sourceTestSuite

TestSuiteReferenceWithProject

Source Test Suite

CloneTestSuiteParams

Test Suite clone operation parameters

Name Type Description
cloneOptions

CloneOptions

Test suite Clone options

destinationTestSuite

DestinationTestSuiteInfo

Destination Test Suite

sourceTestSuite

SourceTestSuiteInfo

Source Test Suite

DestinationTestSuiteInfo

Destination Test Suite information for clone operation

Name Type Description
id

integer

Destination Suite Id

project

string

Destination Project Name

ProjectState

Project state.

Name Type Description
all

string

All projects regardless of state.

createPending

string

Project has been queued for creation, but the process has not yet started.

deleted

string

Project has been deleted.

deleting

string

Project is in the process of being deleted.

new

string

Project is in the process of being created.

unchanged

string

Project has not been changed.

wellFormed

string

Project is completely created and ready to use.

ProjectVisibility

Project visibility.

Name Type Description
private

string

The project is only visible to users with explicit access.

public

string

The project is visible to all.

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

SourceTestSuiteInfo

Source Test Suite information for clone operation

Name Type Description
id

integer

Id of the Source Test Suite

TeamProjectReference

Represents a shallow reference to a TeamProject.

Name Type Description
abbreviation

string

Project abbreviation.

defaultTeamImageUrl

string

Url to default team identity image.

description

string

The project's description (if any).

id

string

Project identifier.

name

string

Project name.

revision

integer

Project revision.

state

ProjectState

Project state.

url

string

Url to the full version of the object.

visibility

ProjectVisibility

Project visibility.

TestSuiteReferenceWithProject

Test Suite Reference

Name Type Description
id

integer

ID of the test suite.

name

string

Name of the test suite.

project

TeamProjectReference

Destination Project