Skip to content

ddCreateDataSetFromJsonFile (Accessing Contents of and Persisting Files within the "Files" module)

Compatible with:
  • Purpose
  • This command is used to create a DataSet from an Json File that is present within the "Files" module in the project. The command takes as input two parameters (a) In the "Target" field, the "Json Filename" and (b) In the "Value" field a DataSet name. This dataset must have been created using the "ddCreateDataSet" command within a test instruction that is executed within the same test but prior to (ahead of) the test instruction which contains the “ddCreateDataSetFromJsonFile" command.
  • When the Dataset used in “Value” field of this command has not been created already anywhere prior within the same test’s runtime before the command “ddCreateDatasetFromJsonFile” gets executed, the test run will get aborted with an error message "For one or more Instructions within the Test Script "" that use the "ddCreateDatasetFromJsonFile" command, the Dataset name provided in the 'Target' field does NOT exist in the scope of the Test Scenario" message.
  • Syntax
  • ddCreateDataSetFromJsonFile(JsonFileName, dataSetName)
  • Target (mandatory)
  • JsonFileName
  • Value (mandatory)
  • dataSetName
  • Return Value
  • N/A
  • Errors & Exceptions   
  • Condition Error/Exception Message
    File doesn't exist in the project The file name provided in the target '"<filename>"' does not exists in the project.
    Malformed Json content in the file The file provided in the target '"<filename>"' is not a valid json file .

 


 

Feedback and Knowledge Base