Forum Discussion

AndersW's avatar
AndersW
Occasional Contributor
14 years ago

Splitting up my exported logs

As my logs tend to grow quite big, and opening them outside TestComplete can take a long time, I would like to split up the logs when exporting them.



Currently I have all my test cases in one Project, and I have code that eports the log at the end of the Main script run. But I would rather that two logs were exported, one for the platform tests (about half the test cases) and one for the Printers and Storage tests (the other half).



Can this be done when they are both in the same project??



If I use log.SaveResultsAs after each half, would the second one, not just still contain the entire log of the first half?? ... or is there a way I can end the test log, export, and then start another within the same project??

5 Replies


  • Hello Anders,





    The current version of the tool does not have an ability to export results only of an individual test item. We have a corresponding suggestion in our database, and your request has increased its rating. Thank you.





    To reduce the log size, you can disable Visualizer (see the Test Visualizer help topic). Also, you can disable events (all those 'window was clicked' messages) by using the Log.LockEvents method.


  • matt's avatar
    matt
    Occasional Contributor
    I too have need for this feature, and I am upset to learn that it is not possible in the current version. It seems like the easiest way to provide this is to allow the log to be cleared from scripts. Then I can run a group of tests, export log results, clear the log and then run the next group of tests and repeat.



    Right now we have the same problem where logs are extremely slow to view (MHT) outside of TestComplete. I am considering the idea of writing a custom tool to drive TestExecute so that I can get separate logs. 



    At any rate, please add me to this request.
  • chris_reynolds's avatar
    chris_reynolds
    Occasional Contributor
    We have a similar problem and would welcome the ability to flush the current logs with a script command so we can manage our own log partitioning.

  • Hi Chris,





    We have an appropriate suggestion in our DB, and your message has increased its rating. Thank you.





    Besides that, if you split your large project to several small projects (or create test items in it - the more test items, the better), TC will flush logs to the HDD and release the memory they consume, so having multiple projects is more efficient. It doesn't matter whether they share project items or not, this doesn't really affect anything.