有没有办法在Robotframework中启动两个动作。我正在尝试运行一个连续运行的进程,然后在不停止第一个进程的情况下执行其他操作。问题是RF正在等待第一个进程完成,然后继续其他操作。好吧,问题是第一个进程不会停止。有什么建议吗?
谢谢,Stell
发布于 2014-08-22 00:39:23
是的,您可以使用Process库来实现这一点。它可以让你在后台运行程序。
在我的开源项目rfhub中,验收测试套件有一个在后台启动集线器的套件设置。
以下是启动集线器的关键字:
*** Keywords ***
| Start rfhub
| | [Arguments] | ${PORT}
| | [Documentation]
| | ... | Starts rfhub on the port given in the variable ${PORT}
| | ... | As a side effect this creates a suite variable named ${rfhub process},
| | ... | which is used by the 'Stop rfhub' keyword.
| |
| | ${rfhub process}= | Start process | python | -m | rfhub | --port | ${PORT}
| | Set suite variable | ${rfhub process}
| | Wait until keyword succeeds | 20 seconds | 1 second
| | ... | Verify URL is reachable | /pinghttps://stackoverflow.com/questions/25427506
复制相似问题