Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Request for CLI Argument --timeout in Robot Framework #5383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Sam-Eldin opened this issue Mar 25, 2025 · 2 comments
Open

Request for CLI Argument --timeout in Robot Framework #5383

Sam-Eldin opened this issue Mar 25, 2025 · 2 comments

Comments

@Sam-Eldin
Copy link

I would like to request a new CLI argument, --timeout, to set an upper time limit for the entire Robot Framework test execution.

I am aware that timeouts can be defined at the suite and test levels, but I am building an automation system that runs Robot Framework tests for multiple teams. Many of these teams do not have timeouts set in their tests, and I need a way to enforce a global timeout for better control.

Currently, I have a timeout for the command handler itself (e.g., an SSH session), but this is not ideal because:

  • If the timeout is reached, Robot Framework does not generate a complete report—tests are left in an incomplete state.
  • Teams cannot determine which test or stage got stuck.
  • Debugging test failures becomes difficult.

Proposed Solution:
Introduce a CLI argument like:

robot --timeout 3h test.robot

This argument would:

  • Act as an upper limit for test execution.
  • Override any timeouts already defined in test cases or suites.
  • Ensure that a proper Robot Framework report is generated when the timeout is reached.

Would this be possible to implement? I believe it would greatly benefit users managing large-scale test automation.

Let me know if I can provide more details!

@pekkaklarck
Copy link
Member

I can see that this would be useful in some cases and believe implementing it wouldn't be too complicated.

Nowadays when Robot runs a keyword, it checks are there test or keyword timeouts active. If there are multiple, it uses the timeout that has least time remaining. Implementing this enhancement would basically require creating a new total timeout type that would be active during the whole execution. It would always be one of the timeout candidates and rest of the timeout functionality ought to work without bigger changes.

I won't have time to look at this myself in the near future, but would be happy to help if someone else is interested.

@hassineabd
Copy link
Contributor

@pekkaklarck
it is similar to expand variable issue , and I have submitted a PR before , i Think i can take it and try to get it done together with the new design of expanding variable ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants