Forum Discussion
Thank you Marsha_R for the reply. All the Test log is from one Script /Test item. So when i use Log.Save as option it is exporting the total log for that Test item.
I am trying to export only part of the log(ex: Folder-1) from the log created for Test item.
You can export it in different places in the log, but you would get it incrementally. So first Folder 1, then Folder 1 + Folder 2, etc.
I don't see a way to do it inside TestComplete, but what you could do is export the whole log to XML, then parse the XML into the folder parts. Here's the way to interpret the log file.
- rajulapati4 years agoContributor
We can get the xml result only when we run though command line . So I assume , we cannot export part of the log file which I was trying.
Thank you for the response
- Marsha_R4 years agoModerator
You can get an xml log from inside a test
XML
You can also export test results to an XML format file from tests by using the
Log.SaveResultsAs
method:Log.SaveResultsAs("C:\\Work\\Log\\Log.xml", lsXML);
- rajulapati4 years agoContributor
Thank you Marsha_R I was able to export it to xml format. When I try to remove the child nodes in xml, the log messages that were generated below it are all deleted from result file. Ex: if I tried to remove all the child nodes of Folder 0, I dont see log messages generated after Folder 0.
I tried manually deleting the nodes from the xml file and see the same issue.
Is my approach correct or do I need to do something different?
Attached is the xml file for reference.
-
Related Content
- 2 years ago
Recent Discussions
- 17 hours ago