0

I am running a shell script to execute test cases in Jenkins. When I build the test cases I am getting the following error.

Failed to open connection to "session" message bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
1575281618795   mozrunner::runner   INFO    Running command: "/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.NhG6sWTOQTlh"
Failed to open connection to "session" message bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Running without a11y support!
Error: no DISPLAY environment variable specified
10:13:38.925 [main] ERROR com.ulab.selenium.base.BaseDriverProcessor - error initating driver..invalid argument: can't kill an exited process
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'localhost.localdomain', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.13-1.el7.elrepo.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: FirefoxDriver

I'm using a custom workspace in Jenkins, in my case, it is "/demo/JarFolder"
and using a shell script(java -cp "./*:bin" org.testng.TestNG testng.xml ) to build it.

I am new to Linux and I am using CentOS 7. I am not able to solve the problem.

  • Please show the relevant code and state the exact problem or error. An error message alone is not enough. Also see [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – jww Dec 03 '19 at 06:53

1 Answers1

0

i think you have to install xvfb plugin which enables you to run graphical applications without a display ...Check jenkins xvfb documentation for more info

Sadha Nanda
  • 337
  • 4
  • 15