如何在 Robot Framework 上创建“后台计时器”?

问题描述 投票:0回答:0

我正在努力创建(并找到类似的例子)我理解为 Robot Framework 上的“后台计时器”。 我的场景是: 我有一个要执行的测试用例,在某一时刻我向我的系统提供了一个输入。然后我需要继续测试其他功能,但在初始输入 30 分钟后,检查预期结果是否发生。

例如:

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.

因为我知道关键字“Sleep”会暂停执行并等待,所以我一直在考虑使用一些逻辑+BultIn Get Time关键字。但想知道这是否是最有效的方法。

robotframework countdowntimer
© www.soinside.com 2019 - 2024. All rights reserved.