Accelerate Headless Testing Execution with Katalon Studio

Introduction

The Headless option helps to run the automated web application in Katalon Studio using the headless browser. This tutorial gives an overview of how to use Headless option and test a webpage without having the visual of the browser view.

Requirements

What is Headless Testing?

Headless Testing is a way to run the browser in a headless environment without the full browser UI. One of the benefits of using headless is that your JavaScript tests will be executed in the same environment as users of your site. Learn more

Headless browser execution using Katalon Studio

Step 1: To start Katalon Studio, double-click on the katalon.exe.

Step 2: After launching Katalon Studio, provide your registered username and password to activate your Katalon Studio.

Katalon activation

Step 3: Once Katalon Studio is activated enter the Project name and its description.

Katalon new project

Step 4: Create a new test case and enter the name and description of the test case.

test case description katalon studio

 

Step 5: Click on the Record Web icon and continue with the created test case.

record web katalon studio

record test case katalon studio

Step 6: Enter the URL in the dialog box opened after clicking the Record Web icon in case need to pause or stop the recording option in between is available in the same dialog box which travels throughout the recording.

Katalon Studio web recorder

Step 7: Select the browser you need to record the UI elements from the drop down.

select browser katalon studio

Step 8: Once the browser is selected browser will be initiated and the selected browser with URL will be opened once the page is completely loaded user can interact with the page and record the necessary action of the web page and the UI elements will be recorded whenever the action is performed by the user.

record web elements

Step 9: Once after the stop button is clicked the record will be finished the action, action data and the Element will be saved and displayed.

finish recording katalon studio

Step 10: After clicking OK the Object Repository dialog will be opened and the user had to make a new folder and save the Object Repository.

object repository

Step 11: Once the above step is completed the created object repository folder will be displayed under Object Repository. (Note: My Object Repository is named as GUI)

created object repository

Step 12: While clicking the Object Repository folder the captured element will be displayed.

captured element katalon studio

Step 13: Once everything is fine the user must click the RUN icon and select the headless chrome or Firefox browser.

run headless browser

Step 14: After selecting the headless browser the Katalon will Open the browser ab start to execute the recorded action in a headless mode. The execution Log can be viewed in Log Viewer.

execution log

Full Source Code

Author: Sri Ram
Learn more: https://www.katalon.com/resources-center/tutorials/headless-browsers-execution/

Leave a Reply