Forum Discussion
Are you coupling the /ExportToXMLAlso command line parameter with the /ExportLog: command line? They have to work together. You can't have the first without the second.
- hkoestin9 years agoOccasional Contributor
Hey Robert
Thanks for your reply.
In fact, I am using the following PS1 script to start the process:
Start-Process TestComplete -ArgumentList "$project /run /exportLog:$log /exportLogToXMLAlso /errorLog:$errorLog /Exit /ns" -Wait
However, even if I start it from an ordinary command prompt, no XML results are produced. I only get the RootLogData.dat file generated, which is XML, but not really structured nor according to the documentation. It is pretty hard to parse, as there is only a Nodes/Node collection in there.
So, the following things tried and no XML results showing up:
* PS1 scripts
* CMD (batch) scripts
* TFS run functional tests with additional arguments in .runsettings file
Only thing working so far: right-clicking the logs in TC itself and clicking on "Export to ..." + then selecting the XML option with unpacked format etc.
BTW: am using version 12.31.1833.7
Thanks again for any advice/help with that topic!
- hkoestin9 years agoOccasional Contributor
I would also be very happy with an ordinary JSON file. Doesn't really matter actually, if it is XML or JSON. Just parsable and in the format as given by the documentation.
- tristaanogre9 years agoEsteemed Contributor
What are you passing in on your $log parameter? Have you tried giving the file name a ".xml" extension?
- hkoestin9 years agoOccasional Contributor
I am passing a simple file path there: e.g. "C:\TestAgent\log.mht"
The path does not contain any spaces, so I can pass it without being worried about escaping etc.
It does not matter what name the log has, passing log.mht and log.xml both evaluates to a file, which contains MHT content in base-64 encoding.
Really going nuts with this problem ... :-(