# Headless execution

**URL:** <https://forum.katalon.com/t/headless-execution/10939>\
**Category:** Miscellaneous\
**Tags:** integrations\
**Created:** [May 15, 2018, 4:12pm UTC](https://forum.katalon.com/t/headless-execution/10939 "2018-05-15T16:12:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omar\_Kalaldeh](https://avatars.discourse-cdn.com/v4/letter/o/bbe5ce/32.png) [@Omar\_Kalaldeh](https://forum.katalon.com/u/Omar_Kalaldeh)\
**Post date:** [May 15, 2018, 4:12pm UTC](https://forum.katalon.com/t/headless-execution/10939/1 "2018-05-15T16:12:24Z")

</div>

Hi,

We are trying run Katalon test script on headless enviroment as part of our CI process, we use following command that I generated from Katalon Studio

```auto
./katalon -noSplash -runMode=console -projectPath="/katalon/katalon/project/eChequesBank.prj" -retry=0 -testSuitePath="Test Suites/Testkatalon" -browserType="Chrome (headless)"

```

But it keeps throwing java.awt.HeadlessException, below is the full log:

```auto
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
133 2.4.7.xx-201611170128-e46 = ACTIVE
Request sent successfully.
/%katalon%katalon%project%eCheques Bank.prj/Keywords/com/sts/qc/testing/JsClick.groovy: 24 Groovy:unable to resolve class internal.GlobalVariable
--------------------------------------------------------------------------------
Test Suites/Testkatalon - Chrome (headless) - 20180515_135542............0/1(0%)
--------------------------------------------------------------------------------
Request sent successfully.
05-15-2018 01:55:45 PM - [START] - Start Test Suite : Test Suites/Testkatalon
05-15-2018 01:55:45 PM - [RUN_DATA] - Logging run data 'hostName' with value 'root - 16bd6eb35a80'
05-15-2018 01:55:45 PM - [RUN_DATA] - Logging run data 'os' with value 'Linux 64bit'
05-15-2018 01:55:45 PM - [RUN_DATA] - Logging run data 'hostAddress' with value '172.17.0.6'
05-15-2018 01:55:45 PM - [RUN_DATA] - Logging run data 'katalonVersion' with value '5.4.1.1'
05-15-2018 01:55:46 PM - [START] - Start Test Case : Test Cases/Test katalon
05-15-2018 01:55:46 PM - [INFO] - Evaluating variables for test case
05-15-2018 01:55:46 PM - [START] - Start action : openBrowser
05-15-2018 01:55:47 PM - [END] - End action : openBrowser
05-15-2018 01:55:47 PM - [ERROR] - Test Cases/Test katalon FAILED because (of) java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
05-15-2018 01:55:47 PM - [END] - End Test Case : Test Cases/Test katalon
05-15-2018 01:55:47 PM - [END] - End Test Suite : Test Suites/Testkatalon 
--------------------------------------------------------------------------------
Test Suites/Testkatalon - Chrome (headless) - 20180515_135542..........1/1(100%)
--------------------------------------------------------------------------------

```

We could solve this issue by outputing to Xvfb as following:

```auto
Xvfb :0 >& /dev/null &DISPLAY=:0export DISPLAY

```

But I am not sure if this the right way, is not setting -browserType=“Chrome (headless)” should solve this without need to output to Xvfb?

Regards,

Omar

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:07am UTC](https://forum.katalon.com/t/headless-execution/10939/2 "2022-08-08T07:07:59Z")

</div>


