How to get Katalon's console log in Collection of Suite execution?

I am trying to run the Collection of Test Suite. And at the end of execution, I could not find a way to get the detail log of all these Test Suite execution, which we usually see in Katalon’s console tab.
Is katalon already saving the logs somewhere ? if not, is there any way to get the logs stored in some file ?

Thanks for the response. It helps for now.
Coming to the second question, is there any way to get these logs stored in some file along with the report ?

Let me explain by example. A katalon project named “test” has a Test Suite Collection named “TSC” which comprises with 2 Test Suites: “TS1” and “TS2”. The TSC wrote files in the Reports folder as follows:

:~/katalon-workspace/test (master *)
$ tree -s Reports/20221109_170914/
[        160]  Reports/20221109_170914/
├── [         96]  TS1
│   └── [        352]  20221109_170915
│       ├── [        312]  20221109_170915.csv
│       ├── [     202413]  20221109_170915.html
│       ├── [       1603]  JUnit_Report.xml
│       ├── [       2678]  execution.properties
│       ├── [         36]  execution.uuid
│       ├── [       8154]  execution0.log
│       ├── [         91]  testCaseBinding
│       ├── [         15]  tsc_id.txt
│       └── [         64]  videos
├── [         96]  TS2
│   └── [        352]  20221109_170917
│       ├── [        738]  20221109_170917.csv
│       ├── [     208071]  20221109_170917.html
│       ├── [      13820]  JUnit_Report.xml
│       ├── [       2678]  execution.properties
│       ├── [         36]  execution.uuid
│       ├── [      27767]  execution0.log
│       ├── [         91]  testCaseBinding
│       ├── [         15]  tsc_id.txt
│       └── [        128]  videos
│           ├── [     136470]  screen_recording_1_0.avi
│           └── [        335]  screen_recording_1_0.srt
└── [         96]  TSC
    └── [         96]  20221109_170914
        └── [       1299]  20221109_170914.rp

8 directories, 19 files

In each Test Suite folder, you find a file named execution0.log. This is the file you want.

I guess, you would be surprised to find the execute0.log file is not a plain line-oriented text; it is an XML file like this:

$ head -n 20 Reports/20221109_170914/TS1/20221109_170915/execution0.log
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2022-11-09T17:09:22</date>
  <millis>1667981362757</millis>
  <sequence>0</sequence>
  <level>START</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>startSuite</method>
  <thread>1</thread>
  <message>Start Test Suite : Test Suites/TS1</message>
  <nestedLevel>0</nestedLevel>
  <escapedJava>false</escapedJava>
  <property name="rerunTestFailImmediately">false</property>
  <property name="retryCount">0</property>
  <property name="name">TS1</property>
  <property name="description"></property>
  <property name="id">Test Suites/TS1</property>
</record>

Classical shell commands (grep, sed, etc) are not enough. You need a program that parses the execution0.log to extract information you want out of it. You need to develop it for yourself.

Ths execution0.log find tends to be very large (20Kbytes, 20mb, or even larger). Therefore DOM-oriented XML parsers are not good fit for processing it. Katalon Studio uses StAX parser to process execution0.log file. See the following article about StAX programming:

1 Like

Thank you so much.
I will take it from here :slight_smile: