Table of contents
1.
Introduction
2.
Viewing and Customising Execution Log for Debugging 
2.1.
Viewing Execution Log
2.1.1.
Tabular vs Tree View  
2.1.2.
Scroll Lock
2.2.
Customizing Console Log  
2.2.1.
Execution Process Debugger 
2.2.2.
Web Service Testing: Extensive Logs 
2.2.3.
Log Configurations 
2.2.4.
Executed Test Steps 
3.
Capturing Screenshots with Katalon Studio 
3.1.
Viewing Taken Screenshots 
3.2.
Deactivating Screenshots
3.3.
Manual Configuration of Screenshots 
3.3.1.
Configuring Screenshots in Manual Mode in Katalon Studio 
4.
Frequently Asked Questions 
4.1.
What is Katalon Studio?
4.2.
Why do we capture screenshots in Katalon?
4.3.
How can you deactivate the default screenshots’ settings?
5.
Conclusion 
Last Updated: Mar 27, 2024

View and Customize Execution Logs and Capture screenshots in Katalon

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Katalon is an automating testing software that lets the users test web, mobile or desktop applications and APIs without coding to deliver efficient and robust software to the consumers. The software is built over the Selenium and Appium automation frameworks, making testing convenient and code-free. 

This blog goes through the steps to customise execution logs for debugging, and to view and edit captured screenshot settings.
 

View and Customize Execution Logs and Capture screenshots in Katalon

Viewing and Customising Execution Log for Debugging 

Viewing Execution Log

After finishing the test case execution, you can review your results in the Log Viewer views.

view log

 

You can specify the specific logs to be displayed by applying filters.
 

Tabular vs Tree View 
 

You can view the Log Viewer in two modes: tabular and tree.

tabular view

 The tree view displays the logs in a more structural way. Users can also navigate to any step by selecting it from the context menu: 

tree view

Scroll Lock

During the execution of the test, the Log Viewer, is constantly updated, with the most recent messages at the bottom. Hence the Log Viewer will keep scrolling down during the execution. To prevent this, you can enable Scroll Lock to stop automatic scrolling.

 

scroll lock

Customizing Console Log 
 

Execution Process Debugger 

The test log contains all information and detailed actions that were performed during runtime. All step statements and desired capabilities information are also included. For easy visualisation and execution, the log levels are ANSI colour-coded based on different levels: INFO, DEBUG, WARNING, ERROR etc.

deubgger

You can get the status of the recent tests from the Status Bar in the Log View. It will be GREEN for tests with a passed status and RED to indicate some kind of failure or error.

 

Web Service Testing: Extensive Logs 

Katalon Studio includes the HAR file version 5.9 onwards in Web Service Execution’s log. This file contains low-level data that helps you identify critical performance issues quickly.
 

When a request is sent, a relative .har file is recorded that is accessible from execution logs. This file will be stored on the current executed machine. 

log

 

When you execute Web Service Suits, the .har files are stored in the requests’ main folder.

.har location

The .har file should be used in services analyser like https://toolbox.googleapps.com/apps/har_analyzer/ as they provide a good insight into the Web Service Request and Response. This aids quick identification of key issues and helps in the efficient allocation of resources. Some issues that are commonly identified are:

  •  Slow loading of pages, timeouts during task execution 
  • Incorrect page formats with missing information 
     

Log Configurations 

When you need more log details than the DEBUG level, use the TRACE level. The log details can also be reduced by using the INFO level.
 

If you want to change the log’s level of the package(s), go to Include> Config > log.properties. 
 

logs

 You’ll notice the difference after uncommenting the logging.level.com.kms=TRACE line.

BEFORE:

before

AFTER:

after

 

Executed Test Steps 

You can disable Log Executed test steps version 7.0 onwards of the Katalon Studio. For this, go to Project Settings > Executions. Disable the option to exclude the executed test steps. 
 

ENABLED:

enabled

DISABLED:

disabled

 

Capturing Screenshots with Katalon Studio 

You can capture screenshots during the test execution. It aids in the identification of problems leading to test failures. By default, Katalon Studio does capture screenshots when a test fails. It is a feature applicable to Web UI and Mobile testing.

Viewing Taken Screenshots 

To view the captured screenshots, we go to the Results tab of the test suite. Do so by following the following steps:
 

  1. Select the desired failed test suite.
  2. Go to its Result tab. 
  3. Select the required failed test case.
  4. Click on the Show Test Case Details button in the top right corner.
  5. Once the Test Case’s Log appears, click on the Image tab.
step5


To view the captured screenshots, click on Export report in a test suite’s report, select the file type ( HTML, PDF etc.), and then open the exported file to view.

step5

 

Deactivating Screenshots

If you want to turn off the default settings of capturing screenshots, follow these steps according to the version you are working with: 
 

  • 7.8 onwards: Go to Project > Settings > Execution.  Uncheck the Take Screenshot when execution failed in the During-Execution Options panel, and apply the changes.
  • Before 7.8: Go to Project > Settings > Report. Uncheck the Take Screenshot when execution failed and click OK.
     

Manual Configuration of Screenshots 

Use the following built-in keywords to manually set the screenshot capturing conditions: 

  • [WebUI] Take Screenshot As Checkpoint (Available from 7.7)
  • [WebUI] Take Area Screenshot As Checkpoint (Available from 7.7)
  • [WebUI] Take Area Screenshot (Available from 7.7)
  • [WebUI] Take Element Screenshot As Checkpoint (Available from 7.7)
  • [WebUI] Take Full Page Screenshot As Checkpoint (Available from 7.7)
  • [WebUI] Take Full Page Screenshot (Available from 7.7)
  • [WebUI] Take Element Screenshot (Available from 7.7)
  • [Mobile] Take Screenshot
  • [WebUI] Take Screenshot
     

Configuring Screenshots in Manual Mode in Katalon Studio 

You can insert built-in keywords in Manual mode if you’re not acquainted with the coding in Script mode. To do so, follow the given steps:

  1. Go to your project. 
  2. Select a test case in manual mode.

You will be able to see all steps 

Now double-click on a test step. Choose options from the dropdown. 

step2

3. Enter the keyword after double-clicking on the new Test step.

A list is displayed of the built-in keywords:

step3

 

4. Now select a built-in keyword.

step4

5. Double-click on the input section to insert a value of the recently added keyword. The input box will appear.

6 . After inserting the keyword’s value, click on OK.
 

Frequently Asked Questions 

What is Katalon Studio?

Katalon is an automating testing software, that lets the users test web, mobile or desktop applications and APIs without coding to deliver efficient and robust softwares to the consumers.

Why do we capture screenshots in Katalon?

You can capture screenshots during the test execution. It aids in the identification of problems leading to test failures. By default, Katalon Studio does capture screenshots when a test fails. It is a feature applicable to Web UI and Mobile testing.

How can you deactivate the default screenshots’ settings?

7.8 onwards: Go to Project > Settings > Execution.  Uncheck the Take Screenshot when execution failed in the During-Execution Options panel, and apply the changes. Before 7.8: Go to Project > Settings > Report. Uncheck the Take Screenshot when execution failed and click OK.

Conclusion 

In this blog, we learnt how to view and customise the execution logs for de-bugging and error finding that lead to failure during the execution. We also learnt how to capture and view captured screenshots, and edit the settings manually. Share and upvote this article if you found it helpful. Apart from this, visit our platform Coding Ninjas Studio to read informational articles on important computer fundamentals like DBMSDSACompetitive ProgrammingPythonJava, etc. Happy Coding!!

 

Live masterclass