Skip to content

ddCreateDataFileFromTestCycleClipboards (Array Creation & Manipulation)

Compatible with:
  • Purpose
  • This command can be used to create Data Files from the Test Cycle Clipboard that are previously persisted using the command 'ddPersistDatasetToTestCycleClipboard'. On execution, this command creates Data Files specific to the corresponding Data Definitions. Status of the Data File is 'Active' by default.

    If the Data File does not exist in the project, a new Data File with that name is created in Worksoft SaaS. On the other hand, if there happens to be a Data File with the same name, the contents of that Data File are overridden by the contents of the Data File that is being created.

    According to the Data Definition(s) specified in the JSON Object, a Data File is created which belongs to that Data Definition. You can also specify the file name in the JSON with which the Data File has to be saved. If there is a Data File that already exists in the domain with the same name, then it would create the Data File as "YOUR_DATAFILENAME _TimeStamp". Otherwise, it just creates the Data File as the specified file name. If no file name mentioned in the JSON, then it would create the Data File as "TestCycleIdentifier_DataDefinitionName_TimeStamp" which is the default notation in Worksoft SaaS. You can also specify as "true" for the "waitUntilFileGenerationCompletes" parameter which waits until the generation of the data files gets completed. If not, you can set it as "false". By default, it would be set to "false".

    To create a Data File from the Clipboard, it needs to be persisted first using ddPersistDatasetToTestCycleClipboard command. 
  • Syntax
  • ddCreateDataFileFromTestCycleClipboards(testCycleIdentifier, JSON Object)
  • Target
  • testCycleIdentifier
  • Value
  • JSON Object (Optional)
  • Return Value
  • NA
    • Below is the JSON Object that has to be provided in the Value field:
    • {
        "consolidatedOutputType": "D",
        "waitUntiFileGenerationCompletes":true/false, 
        "dataDefinitions": [{
          "name": "YOUR_DATADEFINITION_NAME",
          "status": "YOUR_DATADEFINITION_STATUS",
          "fileName": "YOUR_DATAFILENAME"
        }, {
          "name": "YOUR_DATADEFINITION_NAME1",
          "status": "YOUR_DATADEFINITION_STATUS1",
          "fileName": "YOUR_DATAFILENAME1"
        }]
      }
    • Please refer to the docs for more information regarding Mandatory and Optional parameters in the JSON Object.

 

Feedback and Knowledge Base