Test Plan Clone - Clone Test Plan
Clone test plan
POST https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/CloneOperation?api-version=6.0-preview.2
POST https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/CloneOperation?deepClone={deepClone}&api-version=6.0-preview.2
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
organization
|
path | True |
|
The name of the Azure DevOps organization. |
|
project
|
path | True |
|
Project ID or project name |
|
api-version
|
query | True |
|
Version of the API to use. This should be set to '6.0-preview.2' to use this version of the api. |
|
deep
|
query |
|
Clones all the associated test cases as well |
Request Body
| Name | Type | Description |
|---|---|---|
| cloneOptions |
Test Plan Clone create parameters |
|
| destinationTestPlan |
Information about destination Test Plan |
|
| sourceTestPlan |
Information about source Test Plan |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
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
|
Build |
The build definition reference resource |
|
Clone |
Common Response for clone operation |
|
Clone |
Clone operation state |
|
Clone |
Clone options for cloning the test suite. |
|
Clone |
Clone Statistics Details. |
|
Clone |
Response for Test Plan clone operation |
|
Clone |
Parameters for Test Plan clone operation |
|
Destination |
Destination Test Plan create parameters |
|
Identity |
|
|
Project |
Project state. |
|
Project |
Project visibility. |
|
Reference |
The class to represent a collection of REST reference links. |
|
Release |
Reference to release environment resource. |
|
Source |
Source Test Plan information for Test Plan clone operation |
|
Source |
Source Test Plan Response for Test Plan clone operation |
|
Team |
Represents a shallow reference to a TeamProject. |
|
Test |
Test outcome settings |
|
Test |
The test plan resource. |
|
Test |
The test suite reference resource. |
BuildDefinitionReference
The build definition reference resource
| Name | Type | Description |
|---|---|---|
| id |
|
ID of the build definition |
| name |
|
Name of the build definition |
CloneOperationCommonResponse
Common Response for clone operation
| Name | Type | Description |
|---|---|---|
| cloneStatistics |
Various statistics related to the clone operation |
|
| completionDate |
|
Completion data of the operation |
| creationDate |
|
Creation data of the operation |
| links |
Reference links |
|
| message |
|
Message related to the job |
| opId |
|
Clone operation Id |
| state |
Clone operation state |
CloneOperationState
Clone operation state
| Name | Type | Description |
|---|---|---|
| failed |
|
value for Failed State |
| inProgress |
|
value for Inprogress state |
| queued |
|
Value for Queued State |
| succeeded |
|
value for Success state |
CloneOptions
Clone options for cloning the test suite.
| Name | Type | Description |
|---|---|---|
| cloneRequirements |
|
If set to true requirements will be cloned |
| copyAllSuites |
|
copy all suites from a source plan |
| copyAncestorHierarchy |
|
copy ancestor hierarchy |
| destinationWorkItemType |
|
Name of the workitem type of the clone |
| overrideParameters |
|
Key value pairs where the key value is overridden by the value. |
| relatedLinkComment |
|
Comment on the link that will link the new clone test case to the original Set null for no comment |
CloneStatistics
Clone Statistics Details.
| Name | Type | Description |
|---|---|---|
| clonedRequirementsCount |
|
Number of requirements cloned so far. |
| clonedSharedStepsCount |
|
Number of shared steps cloned so far. |
| clonedTestCasesCount |
|
Number of test cases cloned so far |
| totalRequirementsCount |
|
Total number of requirements to be cloned |
| totalTestCasesCount |
|
Total number of test cases to be cloned |
CloneTestPlanOperationInformation
Response for Test Plan clone operation
| Name | Type | Description |
|---|---|---|
| cloneOperationResponse |
Various information related to the clone |
|
| cloneOptions |
Test Plan Clone create parameters |
|
| destinationTestPlan |
Information of destination Test Plan |
|
| sourceTestPlan |
Information of source Test Plan |
CloneTestPlanParams
Parameters for Test Plan clone operation
| Name | Type | Description |
|---|---|---|
| cloneOptions |
Test Plan Clone create parameters |
|
| destinationTestPlan |
Information about destination Test Plan |
|
| sourceTestPlan |
Information about source Test Plan |
DestinationTestPlanCloneParams
Destination Test Plan create parameters
| Name | Type | Description |
|---|---|---|
| areaPath |
|
Area of the test plan. |
| buildDefinition |
The Build Definition that generates a build associated with this test plan. |
|
| buildId |
|
Build to be tested. |
| description |
|
Description of the test plan. |
| endDate |
|
End date for the test plan. |
| iteration |
|
Iteration path of the test plan. |
| name |
|
Name of the test plan. |
| owner |
Owner of the test plan. |
|
| project |
|
Destination Project Name |
| releaseEnvironmentDefinition |
Release Environment to be used to deploy the build and run automated tests from this test plan. |
|
| startDate |
|
Start date for the test plan. |
| state |
|
State of the test plan. |
| testOutcomeSettings |
Value to configure how same tests across test suites under a test plan need to behave |
IdentityRef
| Name | Type | Description |
|---|---|---|
| _links |
This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. |
|
| descriptor |
|
The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. |
| directoryAlias |
|
Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary |
| displayName |
|
This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. |
| id |
|
|
| imageUrl |
|
Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary |
| inactive |
|
Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary |
| isAadIdentity |
|
Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) |
| isContainer |
|
Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) |
| isDeletedInOrigin |
|
|
| profileUrl |
|
Deprecated - not in use in most preexisting implementations of ToIdentityRef |
| uniqueName |
|
Deprecated - use Domain+PrincipalName instead |
| url |
|
This url is the full route to the source resource of this graph subject. |
ProjectState
Project state.
| Name | Type | Description |
|---|---|---|
| all |
|
All projects regardless of state. |
| createPending |
|
Project has been queued for creation, but the process has not yet started. |
| deleted |
|
Project has been deleted. |
| deleting |
|
Project is in the process of being deleted. |
| new |
|
Project is in the process of being created. |
| unchanged |
|
Project has not been changed. |
| wellFormed |
|
Project is completely created and ready to use. |
ProjectVisibility
Project visibility.
| Name | Type | Description |
|---|---|---|
| private |
|
The project is only visible to users with explicit access. |
| public |
|
The project is visible to all. |
ReferenceLinks
The class to represent a collection of REST reference links.
| Name | Type | Description |
|---|---|---|
| links |
|
The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |
ReleaseEnvironmentDefinitionReference
Reference to release environment resource.
| Name | Type | Description |
|---|---|---|
| definitionId |
|
ID of the release definition that contains the release environment definition. |
| environmentDefinitionId |
|
ID of the release environment definition. |
SourceTestPlanInfo
Source Test Plan information for Test Plan clone operation
| Name | Type | Description |
|---|---|---|
| id |
|
ID of the source Test Plan |
| suiteIds |
|
Id of suites to be cloned inside source Test Plan |
SourceTestplanResponse
Source Test Plan Response for Test Plan clone operation
| Name | Type | Description |
|---|---|---|
| id |
|
ID of the test plan. |
| name |
|
Name of the test plan. |
| project |
project reference |
|
| suiteIds |
|
Id of suites to be cloned inside source Test Plan |
TeamProjectReference
Represents a shallow reference to a TeamProject.
| Name | Type | Description |
|---|---|---|
| abbreviation |
|
Project abbreviation. |
| defaultTeamImageUrl |
|
Url to default team identity image. |
| description |
|
The project's description (if any). |
| id |
|
Project identifier. |
| lastUpdateTime |
|
Project last update time. |
| name |
|
Project name. |
| revision |
|
Project revision. |
| state |
Project state. |
|
| url |
|
Url to the full version of the object. |
| visibility |
Project visibility. |
TestOutcomeSettings
Test outcome settings
| Name | Type | Description |
|---|---|---|
| syncOutcomeAcrossSuites |
|
Value to configure how test outcomes for the same tests across suites are shown |
TestPlan
The test plan resource.
| Name | Type | Description |
|---|---|---|
| _links |
Relevant links |
|
| areaPath |
|
Area of the test plan. |
| buildDefinition |
The Build Definition that generates a build associated with this test plan. |
|
| buildId |
|
Build to be tested. |
| description |
|
Description of the test plan. |
| endDate |
|
End date for the test plan. |
| id |
|
ID of the test plan. |
| iteration |
|
Iteration path of the test plan. |
| name |
|
Name of the test plan. |
| owner |
Owner of the test plan. |
|
| previousBuildId |
|
Previous build Id associated with the test plan |
| project |
Project which contains the test plan. |
|
| releaseEnvironmentDefinition |
Release Environment to be used to deploy the build and run automated tests from this test plan. |
|
| revision |
|
Revision of the test plan. |
| rootSuite |
Root test suite of the test plan. |
|
| startDate |
|
Start date for the test plan. |
| state |
|
State of the test plan. |
| testOutcomeSettings |
Value to configure how same tests across test suites under a test plan need to behave |
|
| updatedBy |
Identity Reference for the last update of the test plan |
|
| updatedDate |
|
Updated date of the test plan |
TestSuiteReference
The test suite reference resource.
| Name | Type | Description |
|---|---|---|
| id |
|
ID of the test suite. |
| name |
|
Name of the test suite. |