Headless Browsers Execution

Estimated reading time: 2 minutes

In essence, headless browser testing is testing a Web page’s functionality, without the presence of a GUI. One of the major advantages of using a headless browser and perform headless testing is that you can run tests more quickly in a real browser environment. Headless browsers can save project teams a tremendous amount of time and smoothly integrate into the CI/CD process.

Katalon Studiosupports headless browsers execution for both Chrome and Firefox. This tutorial will you how to execute tests using headless browsers and additional configurations (if needed) to tweak your browsers.

Configuring headless browsers

By default, executing automation tests using one of these headless browsers: Firefox or Chrome will add desired capabilities to the browsers. You don’t need to add any additional configurations.

In case you need to add more desired capabilities to the browsers, then:

  • Go to **Project → Settings → Execution → **Default → Select either Chrome (headless) orFirefox (headless)
  • Add your desired capabilities in these settings. For example, to make your Chrome (headless) start in smaller Window size:

Configuring headless browsersTo find out more about desired capabilities, refer to this guide.

Executing automation tests

Execute test case/test suite

  • Open a test case or test suite you want to execute

  • Select either Chrome (headless) or Firefox (headless) from the execution items list

Executing automation test

  • Then, your current test case / test suite will be executed using the selected headless browser

execute test case

Execute test suite collection

  • Open a test suite collection that you want to execute

  • Add a test suite into this test suite collection

  • Select the Run with field

  • Select either Chrome (headless) or Firefox (headless)

Execute Test Suite Collection

  • Save changes to your current test suite collection

Test Suite Collection

  • Execute this test suite collection and Katalon Studio will use the selected environment to run

Execute using console mode execution

We recommend using headless browser in console mode execution for faster and more continuous releases.

Learn more on how to leverage Katalon Studio in CI/CD process.

  • To start, generate your console mode commands by selecting either Chrome (headless) or Firefox (headless)
  • Click the Build CMD button on the main toolbar.

Execute using console mode execution

  • Execute your tests in console mode using the generated command script from Katalon Studio.

Execute using console mode execution

Note: The headless browsers will NOT be displayed during this execution step.

For further instructions and help, please refer to Katalon Studio Tutorials and Katalon Forum.

User Contributed Notes