Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Executing Selenium HTML Test Suite in Jenkins is not able to launch on firefox

I am trying to integrate Jenkins with Selenium. I have prepared the following command:

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>"

When I executed the command in the command line, it worked fine. Then I called the same command through Jenkins and I got the following error:

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

Then we created a profile for Firefox and ran with the profile. Now I am getting the following error:

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

I have jenkins 1.452 and seleniumHQ2.0

Any help in this regard will be appreciated.

like image 332
Suman Avatar asked Nov 26 '25 10:11

Suman


1 Answers

Before I invoke, Selenium RC, I have added one more command to export display, with this I am able to run selenium RC from Jenkins

Command I executed is

export DISPLAY=:0;

like image 58
Suman Avatar answered Nov 28 '25 23:11

Suman