7 Comments
- altus_nelContributor
Hi there,
Not sure why you need a new feature for this? You can try using aqFile.Move().
We keep the log file as is and then simply export it to a central location like this for example:
var outFileName; var filename = aqConvert.DateTimeToFormatStr(aqDateTime.Now(),"%Y%m%d_%H%M"); Log.Event("Converting output to mht..."); outFileName = Project.ConfigPath + "Log\\" + filename + ".mht"; Log.Message(outFileName); Log.SaveResultsAs(outFileName, 2); //converts output to mht if(aqFile.Exists("q:\\automation\\run_output\\" + filename + ".mht")){ aqFile.Delete("q:\\automation\\run_output\\" + filename + ".mht"); } //Copy the file elsewhere if(aqFile.Move(outFileName, "q:\\automation\\run_output\\" + filename + ".mht")){ Log.Message("File moved"); } else { Log.Warning("File was not moved!"); }
Hope this helps somewhat
- sdahiyaOccasional Contributor
Hi,
Thanks for your answer. Yes, this could be one option as an alternative
but in this case, i must use this custom method in the end of execution of all testcases or test modules.
and I would like to avoid it.
So it will always better once you setup the custom path in the begining of test execution.
Regards,
- HKosovaSmartBear Alumni (Retired)
You can change the log path in Tools > Current Project Properties > General > Log location. Is this what you need?
- sdahiyaOccasional Contributor
Hi,
No, this is not what I am looking for!
Actually I want to set the log location 'path' during run time instead of setting it in the Project settings.
- marinbContributor
We use an environment variable in our log path
\\NetworkPath\TestCompleteLogs\%COMPUTERNAME%
This ensures that we have a centralized network dir. Maybe this is something you can use? You can set environment variables during runtime, which will automatically change the log directory.
On the other hand, I think that TestComplete should also enable to set the log dir via Options.LogPath or something.
- HKosovaSmartBear Alumni (Retired)
Hi st-pat! This discussion is about TestComplete. For ReadyAPI questions, please use the ReadyAPI forum.
Related Content
- 4 years ago
- 4 years ago
- 2 years ago