Challenges with Katalon Studio on Debian Headless Environment

Hey folks, I’m having some trouble switching from Selenium to Katalon on my Debian server with Jenkins. I’m trying to run Katalon in headless mode, but I keep hitting roadblocks.

When I run the Katalon command, I get an error about no X11 DISPLAY variable. I tried setting it to ‘:0’, but that didn’t work either. The server doesn’t have an X server installed.

I also tried adding the Java headless option, but no luck there. On top of that, I’m getting ‘NoClassDefFoundError’ for Katalon classes on every step.

Here’s a simplified version of what I’m running:

./katalon-runner --headless --project="/path/to/project.prj" \
--test-suite="TestSuites/MyTestSuite" \
--report-path="/path/to/reports"

Has anyone run into similar issues? Any tips on getting Katalon to play nice with a headless Debian setup? I’m pretty stumped at this point. Thanks!

hey, have u tried using xvfb? it’s a virtual framebuffer that can simulate a display. install it with apt-get, then run it like this:

Xvfb :99 -ac &
export DISPLAY=:99

then run ur katalon command. this might solve the X11 issue. for the classpath stuff, make sure all ur katalon libs are in the CLASSPATH. good luck!

I’ve encountered similar issues with running Katalon in a headless setup. In my case, the solution was to simulate a display using Xvfb. I installed it via the apt-get command, then started Xvfb on display :99 and set the DISPLAY variable accordingly. This approach enabled Katalon to find a virtual display, allowing the headless mode to operate correctly. Additionally, making sure that the CLASSPATH included all necessary Katalon libraries eliminated the NoClassDefFoundError. These steps helped me navigate the headless environment challenges successfully.

I’ve faced the same issues with Katalon on headless Debian in the past. The X11 DISPLAY error is a regular challenge that I solved by creating a virtual display using Xvfb. I installed Xvfb with sudo apt-get install xvfb, then started it with the command Xvfb :99 -ac & and set the DISPLAY variable by exporting DISPLAY=:99. After this, running the Katalon command worked since it detected a display. I also resolved the NoClassDefFoundError by ensuring my CLASSPATH included all necessary Katalon libraries and by verifying that I was using the correct version of Java. This approach helped me manage the headless setup effectively.