Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Jenkins中执行Selenium HTML测试套件无法在firefox上启动_Firefox_Selenium_Jenkins_Test Suite - Fatal编程技术网

在Jenkins中执行Selenium HTML测试套件无法在firefox上启动

在Jenkins中执行Selenium HTML测试套件无法在firefox上启动,firefox,selenium,jenkins,test-suite,Firefox,Selenium,Jenkins,Test Suite,我正在尝试将Jenkins与Selenium结合起来。我已准备好以下命令: java -jar <Full Path of the Selenium RC Jar, including jar file name> \ -htmlSuite *firefox "<Application URL>" \ "<Test Suite Path Including test suite name>" "<Results file name>" 然后我

我正在尝试将Jenkins与Selenium结合起来。我已准备好以下命令:

java -jar <Full Path of the Selenium RC Jar, including jar file name> \
 -htmlSuite *firefox "<Application URL>" \
 "<Test Suite Path Including test suite name>" "<Results file name>"
然后我们为Firefox创建了一个配置文件,并使用该配置文件运行。现在我得到以下错误:

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
516 [main] INFO org.openqa.jetty.util.Container - Started org.openqa.jetty.jetty.Server@13f3045
HTML suite exception seen:
java.lang.NullPointerException
    at org.openqa.selenium.io.FileHandler.copyDir(FileHandler.java:229)
    at org.openqa.selenium.io.FileHandler.copy(FileHandler.java:213)
    at org.openqa.selenium.io.FileHandler.copy(FileHandler.java:200)
    at org.openqa.selenium.browserlaunchers.LauncherUtils.copyDirectory(LauncherUtils.java:223)
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.copyDirectory(FirefoxChromeLauncher.java:147)
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.initProfileTemplate(FirefoxChromeLauncher.java:174)
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.makeCustomProfile(FirefoxChromeLauncher.java:221)
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:89)
    at
我有jenkins 1.452和seleniumHQ2.0


在此方面的任何帮助都将不胜感激。

您可能希望在Firefox中为Selenium准备一个配置文件:看看是否可以帮助(答案没有标记为已回答,但OP发布了他的解决方案。

在我调用Selenium RC之前,我添加了一个导出显示的命令,通过这个命令,我可以从Jenkins运行Selenium RC

我执行的命令是


export DISPLAY=:0;

在我们的Jenkins实现中,我们使用Xvfb作为Firefox运行的无头X服务器。您可以在此处看到我们实现的详细信息

我在尝试让selenium运行无头时遇到相同的错误。经过一些搜索后,我意识到我运行selenium的用户没有访问Firefox pro的权限我创建的文件目录。更改配置文件目录的权限使我克服了此错误。

哪个用户正在运行jenkins?它是以root用户身份运行的?您的操作系统是什么?Windows还是Linux?