Log.SaveResultsAs() does not give a value for "error test count" field
I am trying to get some information from the logs after my final test has completed but when I call Log.SaveResultsAs() from code some of the fields in description.tclog are not filled in. "error test count" and "warning test count" are always 0.
I have an event handler for OnStopTest() where I call Log.SaveResultsAs(tempFolder, lsXML) from the final test. Even though all of the tests have been executed, "error test count" and "warning test count" are always 0. I tried calling Log.SaveToDisk() right before I call Log.SaveResultsAs() hoping that it would flush the buffer but I am still seeing some of the values in description.tclog set to 0.
Any ideas on how I can get the log file generated with the updated values (including "error test count") from my scripts?
I don't want to have to add another project, I would prefer to do this from the OnStopTest() event handler (I do check that the log is only written for the final test)