When running a test suite from the console, is it possible to redirect the output to a specific file for example? I find the console log sometimes has useful details I’m missing from the test suite report.
When using the -consoleLog option, it displays the output to the console window. I’d like to redirect this to a file, for better readability and also to prevent the output being truncated by the console window.
Is this possible? Any suggestions for other workarounds?
You can add > or >> to append to a file from the current execution logs, e.g:
katalon -runMode=console -consoleLog -noExit -projectPath="C:\Project\yourProject.prj" -retry=0 -testSuitePath="Test Suites/TS_RegressionTest" -browserType="Chrome" >> C:\output.txt
Thanks for the input Vinh!
Unfortunately, I’m always getting an empty file when I do as you suggest.
When I execute the “katalon” command, it runs in a seperate console window and that’s where all the log is printed out. So in the parent console, the commands returns instantly with nothing on stdout, hence the empty “output.txt” file.
Ah I’ve figured out there is .log file in generated test suite report folder as well as other log files within this folder. This .log file contains the same information from console mode output, so you can use this as well.
Screenshot at Jan 05 10-04-31.png
Thanks for the suggestion of redirecting the command line to an output file. I purposely forced a failure run so as to make sure the log recorded a ‘Fail’ message, but it did not. The logging stopped on the line of my test case that failed, but it still went on to record the ‘END test’ logging lines and last line which I thought would be a test count passed of test tests, showed 1/1 (100%). If I go look at the Report from Katalon studio, I can see in the studio screen that it says the test case failed. How can I get Katalong to dump a Fail text in the redirected output log file? Thanks for any help.
This answer is really worthless.
No one has answered this well at all, and here other people are stuck with the same question and no answers.
@Guillaume_Levesque, @jmonson, @cpjohnson
eclipsec -runMode=console -consoleLog -noExit -projectPath=“C:\Project\yourProject.prj” -retry=0 -testSuitePath=“Test Suites/TS_RegressionTest” -browserType=“Chrome” >> ouput.txt
Please replace katalon with eclipsec if you are working on a Windows machine.
I think if we had a way to specify our own report file name on the console command line mode (seems like that use to be possible?) and that if it could have some simplistic report of the test case(s) run and if they passed or failed, in addition to the more detailed information. We then wouldn’t need to be trying to re-direct the console output to a file for post processing. In case of successful suite runs, we may just want to see that test cases passed. It is when there is a failure that we want to be able to easily tell that a failure occurred (unique keyword FAILED) and then to be able to review the more detailed log information.
Thanks for the suggested work around of replacing katalon with eclipsec. That is inconsistent with the documentation as to how to run a test suite from the command line so I am wondering if that will be the documented end solution or will adjustments be made in an upcoming release?