Forum Discussion

rhu's avatar
rhu
Contributor
2 years ago

How to get a unique Logfile after each TestExecute run?

I have some tests where I start TestExecute and the Tests via commandline and I write a logfile to a directory like: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe" "C:\myt...
  • rhu's avatar
    2 years ago

    1st - thanks rraghvani for the idea to do the renaming with a "script".
    I am using an european date/time format like this:
    29.11.2022
    10:41:50,54

    there fore I added a line at the end of my batchfile where I rename the outputfile  and ad a timestamp like:
    ren C:\Temp\TCLogs\LogT2.xml LogT2_%date:.=_%-%TIME:~0,2%_%TIME:~3,2%_%TIME:~6,2%.xml

    and I get a filename like:
    LogT2_29_11_2022-10_41_50.xml