stuck pipeline robotframework

Hello community, I have a very frequent problem with the robot framework in the Jenkis pipeline, many times certain test cases get stuck and I have to abort the execution manually. Do you know if there is any keywork to avoid this random jam or what would be the best way to do so? solve this problem

Hi @alvarocascante12,

Robot framework won’t jam up like this on it’s own, so a better approach might be to figure out where it’s happening so you can then try and work out why it’s happening.

The problem here is if you are aborting the execution manually before the keyword times out, you are probably not getting logs that you can view?

Many libraries have timeout settings that you can adjust, so it’s probably worth checking the library (libraries?) you are using and set the timeout shorter.

Also if you are logging the console output from robot framework, does that give you any clue as to what happening? if not it might also be worth using Log To Console to log various points in your test to find where in the test it’s getting hung up.

Hope that helps,

Dave.

1 Like

Hi,
I am also having the same issue, did you get the solution for this issue?

I know atleast one reason - if jenkins slave is windows machine and any keywords interact with subprocesses and pipe the stdout and/or error stderr but those are not read by the initiating side of the subprocess, RF will hang until the buffer is read.

This is not RF behaviour thought, its how windows works …

On what @damies13 wrote:

Many libraries have timeout settings that you can adjust, so it’s probably worth checking the library (libraries?) you are using and set the timeout shorter.

While this is correct - since RF is single threaded - if actual keyword or call to external library hangs indefinitely - buildin timeout mechanism in those cases might not work as expected as typical way to implement things is “poll state → once state is polled and state is not expected but there’s still time to poll again → rinse and repeat”… In this sort of scenario, if polling hangs, library (or RF) wont have be checking the amount of time that has progressed since previous check and thus, timeout wont happen.

1 Like