It's very tedious to export one by one when you have tens to hundreds of log files and you want to export all of them. A mass export option would be helpful.
Omg such a great idea give this man a medal
Question: How do you have hundreds of different log files within the same project? Each test execution of a project creates one log file... so, at the end of the project, when it completes, you export that log file. Each time you run the project, you export the current log file.
If you have hundreds of projects in a project suite and want to execute the log for each one... again, the export happens within the project, not at the suite level (suites don't actually execute code, they just contain projects). So, if you run your project suite, each project that runs will export the desired log.
Guess I'm trying to understand what problem is attempting to be solved.
Defects! With stop on error/stop on warning enabled and having frequent stoppages due to defects or automation issues with your scripts, the log files begin to pile up.
So... turn off "stop on error/stop on warning" and create your automation to only stop when you want it to. Then, wrap your execution in try/catch/finally logic so that, when you DO run into an exception that causes you to have to halt the tests, you still export the log.
OR... you could implement "OnStopTest" event handler so that, when the test halts, you will execute log export.
Are you looking for something like this, Which exists already.
Script to Save Logs:
Function SaveLogAsYouWishFolderPath = “C:\Desktop\TC_Logs\Log\”FileName = aqDateTime.Nowlog.Message FileNameCurrenTime = aqConvert.DateTimeToFormatStr(FileName,”%d_%m_%Y_%H_%M_%S”)Log.Message CurrenTimeLogFileName = FolderPath & CurrenTime & “_Log.mht”Log.Message LogFileNamecall Log.SaveResultsAs(LogFileName, lsMHT)End Function
This function creates log and saves without over righting the existing log. Because the file name is created with respect to time stamp.
Added to it, if you keep this script in Events "OnStop of Test" . It resolves.
Keep this in different project, by sharing different FolderPath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.