I need to re-name automatically LogFile.txt or jason or xml file as well as folder (not to be by default) based on individual script runs. I have just started to use eggplant. Is there any way to do that and how? Thanks
what is the use case for it? What do you want to achieve?
Renaming the folder and log files is only possible after a script run. As the last line of the script is written at the moment the script finishes.
the xml (json) file is written after log.txt has been closed. At least I think that’s how it works.
That is what I wonted to know. I need to change LogFile names in order to be used/integrated with some confluence page. I need unique names but will try to do it after LogFiles are created.
Thank you for quick response
- To access the log files after the run. You can use the Suite settings. Create a script and link it here.
- To get the result folder of the last run you can do the following. Make sure you put it into a global variable. This ensures you can access the variable within another script
- to get the current run folder use this. The last item contains a property list which key/value pairs you can use.
# full list put the last item of scriptResults() into myResultPath # only the logfile.txt put property logfile of the last item of scriptResults() into myResultPath
- As mentioned above. My recommendation is to create a copy of the files and rename them.