How to do some infinite task with Robot Framework?

时光怂恿深爱的人放手 提交于 2019-12-06 11:37:36

问题


I need to "enable and disable the firewall" continuously using robot framework.

I have written following robot testcase for this purpose:

testcase1
    Open Connection                         1.1.1.1
    Login                                   test    test
    Write                                   firewall enable
    Write                                   commit
    Write                                   firewall disable
    Write                                   commit  

The above testcase doing the task as expected but only one time. But I want to do this continuously (infinite).

Any clue please? Thanks in advance for your help.


回答1:


You could put it inside a for loop. It is not infinite but if you put large enough value it is close enough for practical purposes. This will create a huge log file.

testcase1
    :FOR    ${index}    IN RANGE    999999
    \    Open Connection    ${TEST}
    \    Rest of code

http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#for-loops



来源:https://stackoverflow.com/questions/30287855/how-to-do-some-infinite-task-with-robot-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!