Forum Discussion

mpartyka's avatar
mpartyka
Contributor
10 years ago

Property expansion in 'Create File' test step file name creation

Property expansion in 'Create File' test step file name creation does not seem to work, but works in same test step for creating the file contents.  Is this a bug or am I doing something wrong?   See...
  • nmrao's avatar
    10 years ago

    Tried the same in ReadyAPI 1.4.1 and got your problem. Let the Smartbear team look into this issue.

     

    Mean while, as workaround, use groovy script with following script and disable create file step

     

    //define the test case property for folder where you want to save file
    def filePath = context.testCase.getPropertyValue('FOLDER')+'/'+ context.testCase.testSuite.getPropertyValue('ExtractDefinitionId')+'.txt'
    def file = new File(filePath)
    file.write(context.expand('${Download - One Topic#Response}'))

    Hope this is useful

  • TanyaYatskovska's avatar
    TanyaYatskovska
    10 years ago

    Hi Mheeke,

     

    Thanks for reporting this issue to our Support Team. I see that our R&D team is investigating it and they will provide us with some updates soon. For a while, please use the workaround suggested by nmrao.