如何 运行 无头盒子中的机器人测试用例。 [竹] [RobotFramework]

How to run robot test cases in a headless box. [Bamboo] [RobotFramework]

我已经设置了一个 VM 框 ubuntu 和 Bamboo 服务器来控制应用程序的构建和集成测试。

我可以 运行(手动或什至通过 Bamboo)测试用例,同时我连接到 VM 并看到所有 selenium 魔法正在发生。

然而,当 VM 以无头方式启动并且我尝试 运行 测试用例时,我得到以下所有测试用例的错误:

WebDriverException:消息:浏览器似乎在我们可以连接之前已经退出。如果您在 FirefoxBinary 构造函数中指定了 log_file,请检查它以获取详细信息。

在无头模式下 运行 有什么好的提示或想法吗?

干杯

您可以使用xvfb. There are many questions and answers about that on Whosebug: https://whosebug.com/search?q=selenium+xvfb

您还可以 运行 针对 phantomjs. There are also lots of questions and answers about that on Whosebug: https://whosebug.com/search?q=selenium+phantomjs

进行测试