Jenkins 无法启动硒测试(等待创建配置文件超时)
Jenkins 无法启动 Selenium 测试(ubuntu) 错误
11:26:24.652信息-已启动org.openqa.jetty.jetty.Server@ab50cd 11:26:24.738 信息 - 正在准备 Firefox 配置文件... HTML 套件出现异常: java.lang.RuntimeException:等待创建配置文件超时! 在 org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360) 在 org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:114) 在 org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:83) 在 org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchHTMLSuite(FirefoxChromeLauncher.java:405) 在 org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchHTMLSuite(FirefoxLauncher.java:105) 在 org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121) 在 org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166) 在 org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:556) 在 org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:241) 在 org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:201) 在 org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:40)
操作系统 - Ubuntu 工作站 11 詹金斯和Selenium - 最新版本(按网站上编写的方式安装)
在我看来,用户 jenkins 没有所有权利,因为如果我使用同一行在终端中执行,它可以工作 selenium 启动 Firefox &做套房。
我还将 jenkins 用户放入 group root 中,但这也没有帮助。
我没有 Linux 资格,但似乎 jenkins 用户的权限有问题,但我可能会出错。
如果有人解决了问题,请写下解决方案。
Jenkins can't launch selenium tests (ubuntu)
error
11:26:24.652 INFO - Started org.openqa.jetty.jetty.Server@ab50cd
11:26:24.738 INFO - Preparing Firefox profile...
HTML suite exception seen:
java.lang.RuntimeException: Timed out waiting for profile to be created!
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:114)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:83)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchHTMLSuite(FirefoxChromeLauncher.java:405)
at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchHTMLSuite(FirefoxLauncher.java:105)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:556)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:241)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:201)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:40)
OS - Ubuntu workstation 11
Jenkins & Selenium - last versions (installed as is it written on sites)
It seems to me that user jenkins have not all the rights, because if i use the same line to execute in terminal, it works selenium starts Firefox & do the suite.
I also put jenkins user in groop root but it also doesn't help.
I'm not qualified in Linux but it seems than trouble is with rights of jenkins user, but i can mistake.
If somebody have solved the problem please write the solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我最近也遇到这个问题了。
我首先尝试了这里提到的方法: http://www. spacevatican.org/2008/9/27/selenium-and-firefox-3 然而,这个修复现在似乎已经过时了,因为插件 maxVersion 属性都设置为8.某事。
我修复它的方式(正如这里提到的:http://www.centripetal.ca/blog/2011/02/07/getting-started-with-selenium-and-jenkins/)的目的是为 Selenium 提供 Firefox 配置文件。
步骤
我的最终 Selenium命令是
我还建议将 jenkins 使用的 shell 命令复制并粘贴到终端中,以避免每次都通过 Jenkins 运行它,
注意我目前发现 Selenium 现在挂起(并且不会崩溃)。它的过程的步骤(启动 Firefox)但这似乎是一个不同的错误,我已将其添加到 stackoverflow 中:在 Ubuntu 上启动 Firefox 时 Selenium 挂起
I was recently having this issue too.
I first tried the method mentioned here : http://www.spacevatican.org/2008/9/27/selenium-and-firefox-3 However this fix now seems out of date, as the plugin maxVersion properties were all set to 8.something.
The way I fixed it (as mentioned here : http://www.centripetal.ca/blog/2011/02/07/getting-started-with-selenium-and-jenkins/) was to provide Selenium with a firefox profile.
Steps
My final Selenium command was
I would also recommend copying and pasting the shell command that jenkins is using into Terminal, to save having to run it through Jenkins each time.
N.B. I'm currently finding that Selenium now hangs (and doesn't crash) on the next step of it's process (Launching Firefox) but this seems like a different bug which I've added to stackoverflow here : Selenium hangs when launching Firefox on Ubuntu
我有类似的问题。但原因和解决方法不同。
程序(我用的是python)挂起一段时间,然后输出:
这是因为我同时安装了 32 位和 64 位版本的 libX11。通过删除 libX11 32 位版本,该程序可以运行。
I have similar issues. But the cause and solution are different.
The program (I use python) hangs for a while, and then output:
It is because I have installed both 32 and 64 bit version of libX11. By removing libX11 32 bit version, the program works.
@mattbilson 的解决方案对我不起作用,但我找到了针对具有相同症状的问题的不同解决方案。我相信在尝试调试问题的过程中,已经安装了多个版本的 Firefox,并且并非全部来自干净的 deb 包。
为了解决这个问题,我做了:
之后我可以运行 Selenium JAR,无需任何特殊参数。
@mattbilson's solution didn't work for me, but I found a different solution to a problem with the same symtomps. I believe In the process of trying to debug the problem, multiple versions of Firefox had been installed, and not all from clean deb packages.
To fix the problem I did:
After that I could run the Selenium JAR without any special parameters.