Skip to content

Copy of an Entity/Project within the domain

Worksoft SaaS allows you to reuse the Test Scripts across different Run Definitions but not across Projects within the domain, now you have a provision to copy a specific entity or the entire Project within a domain. For example, you have incorporated a few changes to your application and those changes are to be implemented in the two environments (having each environment for each project) available in the Worksoft SaaS application. So, now you can make changes in one project and implement the changes in the other project by using this feature. 

A new QaCONNECT Service is introduced to support this feature. Using this service, you can copy the automation entities from one project to another project within a domain. Please ensure that the data correction cannot be made for the copied entities, so the necessary steps have to be taken care of while doing this 'Copy' operation. There are different parameters for performing this request.

There are different parameters available in the request JSON. Refer to the 'Account' section in the docs page of Worksoft SaaS QaCONNECT REST API.


You will be able to copy a specific entity/bulk copy from one project to another project based on the needs of you and your team members within the domain. Considering an example where you wanted to perform the Copy operation for a specific entity like a Test Script.

Below are the few Use Cases and Examples which can be used in your projects during Copy operation:

Use Case 1: Clone Entities by Test Cycle Identifier without creating Products & Environments

On using the request JSON, you can clone all the entities tagged to a test cycle identifier

{
  "sourceProjectName": "<Source Project Name>",
  "destinationProjectName": "<Destination Project Name>",
  "appendNameforDuplicateEntities": "_V 1.0",
  "createNewProductIndicator": false,
  "abortProcessingIfEntityNonExistent": false,
  "testCycleIdentifier": "<Test Cycle Identifier name>",
  "notificationRecipients": [
    "user1",
    "user2"
  ],
  "productsList": [
    {
      "sourceProjectProductName": "<Source project name>",
      "destinationProjectProductName": "<Destination project name>"
    }
  ],
  "createNewEnvironmentIndicator": false,
  "environmentsList": [
    {
      "sourceProjectProductEnvironmentName": "<Source Environment>",
      "destinationProjectProductEnvironmentName": "<Destination Environment>"
    }
  ]
}

Use Case 2: Clone Entities by Name without creating products & Environments

On using the below Request JSON, you can clone all the entities by specifying the name

{
  "sourceProjectName": "<Source Project Name>",
  "destinationProjectName": "<destination Project Name>",
  "notificationRecipients": [
    "<List of email recipients>"
  ],
  "notificationMethodCode": 1,
  "abortProcessingIfEntityNonExistent": true,
  "createNewProductIndicator": false,
  "productsList": [
    {
      "sourceProjectProductName": "<Product Name>",
      "destinationProjectProductName": "<Product Name>"
    }
  ],
  "createNewEnvironmentIndicator": false,
  "environmentsList": [
    {
      "sourceProjectProductEnvironmentName": "Production",
      "destinationProjectProductEnvironmentName": "Production"
    }
  ],
  "entityCopyOptionsList": {
    "copyOptionTypeCodeId": "N",
    "createTestingPlatformGroups": false,
    "testingPlatformGroupsList": [
      ""
    ],
    "doNotCopyBoundDataFiles ": false,
    "doNotCopyBoundFiles": false
  },
  "entitiesFilterList": [
    {
      "entityType": "RD",
      "entityNamedList": [
        {
          "name": "<Run Definition Name>",
          "status": "Active"
        }
      ]
    }
  ]
}

Example 1

Below is the Request JSON for copying a specific Test Script:

{
  "sourceProjectName": "YOUR_SOURCE_PROJECT_NAME",
  "destinationProjectName": "YOUR_DESTINATION_PROJECT_NAME",
  "appendNameforDuplicateEntities": "_Copy",
  "createNewProductIndicator": false,
  "abortProcessingIfEntityNonExistent": false,
  "productsList": [
    {
      "sourceProjectProductName": "Source_Product",
      "destinationProjectProductName": "Destination_Product"
    }
  ],
  "createNewEnvironmentIndicator": false,
  "environmentsList": [
    {
      "sourceProjectProductEnvironmentName": "QA",
      "destinationProjectProductEnvironmentName": "Pre-Prod"
    }
  ],
  "entityCopyOptionsList": {
    "copyOptionTypeCodeId": "N",
    "doNotCopyBoundDataFiles": false,
    "doNotCopyBoundFiles": false
  },
  "entitiesFilterList": [
    {
      "entityType": "TS",
      "entityNamedList": [
        {
          "name": "Search for a Product",
          "status": "WIP"
        }
      ]
    }
  ]
}

Example 2

Below is the Request JSON for the bulk copy of the Test Scripts:

{
  "sourceProjectName": "YOUR_SOURCE_PROJECT_NAME",
  "destinationProjectName": "YOUR_DESTINATION_PROJECT_NAME",
  "appendNameforDuplicateEntities": "_Copy",
  "createNewProductIndicator": false,
  "abortProcessingIfEntityNonExistent": false,
  "productsList": [
    {
      "sourceProjectProductName": "Source_Product",
      "destinationProjectProductName": "Destination_Product"
    }
  ],
  "createNewEnvironmentIndicator": false,
  "environmentsList": [
    {
      "sourceProjectProductEnvironmentName": "QA",
      "destinationProjectProductEnvironmentName": "Pre-Prod"
    }
  ],
  "entityCopyOptionsList": {
    "copyOptionTypeCodeId": "B",
    "doNotCopyBoundDataFiles": false,
    "doNotCopyBoundFiles": false
  },
  "entitiesFilterList": [
    {
      "entityType": "TS"
    }
  ]
}

Example 3

Below is the Request JSON for copying the entities linked to a Test Cycle Identifier by specifying the value in the 'testCycleIdentifier' field:

{
  "sourceProjectName": "YOUR_SOURCE_PROJECT_NAME",
  "destinationProjectName": "YOUR_DESTINATION_PROJECT_NAME",
  "appendNameforDuplicateEntities": "_Copy",
  "createNewProductIndicator": false,
  "abortProcessingIfEntityNonExistent": false,
  "testCycleIdentifier": "YOUR_TEST_CYCLE_IDENTIFIER",
  "notificationRecipients": [
    "youremail@email.com",
    "user1"
  ],
  "notificationMethodCode": 1,
  "productsList": [
    {
      "sourceProjectProductName": "Source_Product",
      "destinationProjectProductName": "Destination_Product"
    }
  ],
  "createNewEnvironmentIndicator": false,
  "environmentsList": [
    {
      "sourceProjectProductEnvironmentName": "QA",
      "destinationProjectProductEnvironmentName": "Pre-Prod"
    }
  ]
}

Example 4

Below is the Request JSON for the bulk copy of the entire Project:

{
  "sourceProjectName": "YOUR_SOURCE_PROJECT_NAME",
  "destinationProjectName": "YOUR_DESTINATION_PROJECT_NAME",
  "appendNameforDuplicateEntities": "_Copy",
  "createNewProductIndicator": false,
  "abortProcessingIfEntityNonExistent": false,
  "productsList": [
    {
      "sourceProjectProductName": "Source_Product",
      "destinationProjectProductName": "Destination_Product"
    }
  ],
  "createNewEnvironmentIndicator": false,
  "environmentsList": [
    {
      "sourceProjectProductEnvironmentName": "QA",
      "destinationProjectProductEnvironmentName": "Pre-Prod"
    }
  ],
  "entityCopyOptionsList": {
    "copyOptionTypeCodeId": "B",
    "doNotCopyBoundDataFiles ": false,
    "doNotCopyBoundFiles": false
  }
}

For all the above input(s), the output JSON would be the same apart from the key which differs for each request as shown below.


To know more about each entity in detail, click here.

Few points to be considered while you are planning to perform the Copy operation

  • Test Runs, Test Cycles, and Analytics Reports data will not be copied from the Source project to the Destination project.
  • When you perform the Copy operation of an entity, for example, you have selected a specific Test Script, then all the entities linked to that Test Script like Data Definitions, Data Files, etc. would also be copied.
  • You performed the Copy operation of any entity and the name of the entity is already existing in the destination Project, then "_Copy" would be appended to the entity name by default.
    If you wish to have a customized text to be appended, you can mention in the 'appendNameforDuplicateEntities' parameter.
  • While copying a specific named entity (or) bulk copy of an entity, it is recommended to provide the right mappings to the Products & Environments.
  • The value of the parameters for binding Data Files and Files in the  'entityCopyOptionsList' is set to "True" by default which does not copy the Data Files and Files bound to the specific entities. To have the Data Files and Files copied along with the specific entity, the value should be set to 'False' in the Request JSON.
  • User-Defined Variables will be copied only wrt the specific product when you perform the copy operation of a specific entity.

Feedback and Knowledge Base