Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
据我所知,文档建议发出“Ctrl-C”来中止“.robot”文件(测试用例/套件)的执行。我想知道是否有办法在发出此“Ctrl-C”时添加清理机制?如果没有,您能否建议我可以使用哪些机器人 api 库来增强?
如果您从控制台使用 control-c 停止执行,robot 仍将运行您的拆卸命令。
从用户指南:
在运行测试的控制台中按下 Ctrl-C 时停止执行。...默认情况下,即使使用上述方法之一停止测试执行,也会执行已启动的测试和套件的拆卸。无论执行如何结束,这都允许运行清理活动。