RobotFramework Debug Logs

This is a very short post, as a complement to my previous post about PyATS, Genie, and RobotFramework.

How can we see the debug logs of RobotFramework?

I’m doing a lot of testing with RobotFramework and Genie right now. And I had a little trouble getting the right level of debugging to fix my mistakes.

Here is a short and efficient way to generate a log file with RobotFramework:

Just add the options -L trace and –b your_debug_file.log to have everything you need. For example:

robot -d ./output -L trace -b debug.log compare_snapshot.robot

Here, -d ./output is to specify the output directory (equivalent to –outputdir), -L trace is to specify the debug level, and -b debug.log is to specify the debug logfile.

Then, you can see the content of the debug.log file after the execution of the robot script, or during its execution by using tail -f from another terminal.



Did you like this article? Please share it…

Leave a Comment