问题
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