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. You don’t need to add any additional configurations.
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 smaller Window size:
Learn more about desired capabilities in Katalon Studio.
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 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 your tests in console mode using the generated command script from Katalon Studio.
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.