0

I am struggling to create (and to find similar examples) of what I understand as a "background timer" on Robot Framework. My scenario is: I have a Test Case to Execute, and at a certain point I give one input to my system. Then I need to keep testing other functionalities on the way, but after 30 min from that initial input, check if the expected outcome is happening or not.

For example:

Run Keyword And Continue On Failure    My_Keyword
#This keyword should trigger the system timer.

Run Keyword And Continue On Failure    Another_Keyword
#This one does not relate with the timer but must also be executed.

Run Keyword And Continue On Failure    My_Third_Keyword
#Same for this one.

Run Keyword And Continue On Failure    Check_Timer_Result
#This one shall see if the inputs from the first keyword are actually having effect.

Since I know the Keyword "Sleep" will pause the execution and wait, I have been think about using some logic + BultIn Get Time keyword. But wondering if this is the most efficient way.

2
  • What would do here is actually multithreading, start a thread with the timer and let it monitor its exhaustion (as the execution may be in a totally different case, or a suite at that point). That would be quite complicated though, thus just a comment - a food for thought on what to research... Commented Feb 20, 2023 at 18:39
  • I usually use this: Get the current time and add 30 minutes. After your keywords, you can calculate how long you need to sleep until 30 minutes are passed. Commented Feb 27, 2023 at 10:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.