output test results to stdout using -o
-
The Qt Test overview specifies that the test log can be output to stdout this way: -o filename,format
"
"[-o filename,format] Writes output to the specified file, in the specified format (one of txt, xml, lightxml, xunitxml or tap). The special filename - may be used to log to standard output."Here it says that a special filename can be used to route it to stdout. I have tried using "-" as the filename but this doesn't register, and instead I get "-o needs an extra parameter specifying the filename and optional format"
Any help would be greatly appreciated.
Thanks!
-
The Qt Test overview specifies that the test log can be output to stdout this way: -o filename,format
"
"[-o filename,format] Writes output to the specified file, in the specified format (one of txt, xml, lightxml, xunitxml or tap). The special filename - may be used to log to standard output."Here it says that a special filename can be used to route it to stdout. I have tried using "-" as the filename but this doesn't register, and instead I get "-o needs an extra parameter specifying the filename and optional format"
Any help would be greatly appreciated.
Thanks!
@Brynnjolf Did you also specify the format?
-
https://doc.qt.io/qt-5/qtest-overview.html#options
just use
-txt -
I should have specified that I am trying to log in multiple formats simultaneously. My bad.
From your link:
"The first version of the -o option (-o filename,format), may be repeated in order to log test results in multiple formats, but no more than one instance of this option can log test results to standard output."So, if I want to log to a file and stdout simultaneously, I believe this is the only option.