Forum Discussion

MarcovS's avatar
MarcovS
Contributor
9 years ago

DataSink: Timestamp in filename

Hi all,   In a testcase, I have a Datasink step, where I want to save data I've collected form DataSource Step and data from executed REST Request TestStep. Every time the testcase/Datasink is exec...
  • MarcovS's avatar
    MarcovS
    9 years ago

    [SOLVED]

     

    Created a DataGen Step with a script-property "CurrentTimestamp" and the following code:

     

    def timestamp = new java.text.SimpleDateFormat('yyyy-MM-dd.HH.mm.ss')
    return timestamp.format(new Date()) 

    Used in the DataSink Step as output path:

     

    H:/PATH/Output/MembershipOptions_output${DataGen#CurrentTimestamp}.xlsx