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:\mytest\test.pjs" /p:test /t:test /es:C:\Temp\TCLogs\LogT2.xml /SkipVisualizerData /NoSummary /DoNotShowLog /SilentMode /r /e
if executing the log file will be written.
If executing again the logfile will be overwritten.
So how can I get different logfiles for each testrun (e.g. adding a timestamp at the end of the logfilname, so that the logfiles are unique) so that i can keep all logs for the testexecution?
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,54there 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%.xmland I get a filename like:
LogT2_29_11_2022-10_41_50.xml