Headless Browsers Execution
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 performing 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 Studio supports 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
In case you need to add more desired capabilities to those headless browsers:
- Go to Project > Settings > Desired Capabilities > WebUI >Chrome (Headless)/Firefox (Headless).
- Add your desired capabilities. For example, to make your Chrome (headless) start with a smaller Window size:
You can learn more about desired capabilities in this document: Desired capabilities.
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.
- Then, your current test case/test suite will be executed using the selected headless browser.
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).
- Save changes to your current 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 the headless browser in console mode execution for faster and more continuous releases.
- To start, generate your console mode commands by selecting either Chrome (headless) or Firefox (headless).
- Click the Build CMD button on the main toolbar.
To learn more about console mode execution in Katalon, you can refer to this document: Command Syntax.
- Execute your tests in console mode using the generated command script from Katalon Studio.
- The headless browsers will NOT be displayed during this execution step.