Toggle LogViewer scroll-locked! Your tests will be boosted

@Russ_Thomas

I know you are a wise man!

But I am afraid, most of Katalon users (including me) are not.


Recently I upgraded to Katalon Studio v8.2.0. Soon after updating, I checked how the Log Viewer is configured.

Log Viewer shows Tree View as default

The Log Viewer is configured to show the Tree View, rather than the Table View, as default. So, I guess, most of Katalon Users will leave it as it is. They may not be aware of the Table View at all.

Table View is configured to show All as default

I checked how the Table View is configured as default.

As you see, the Table View is configured to show All messages as default. I am sure, most of the Katalon users have the same setting.

Of course you can deselect All, and select Warning, Failed and Error. But you would change the settings only if you are aware of the implication to the tests performance. Most of the Katalon users are not.

“loading logs (XX%)” takes long time

I tried switching from the Table View to the Tree View. Something ridiculous I saw. When I toggled the button, LogViewer started “loading logs”. It took 62 seconds! I wanted to stop it, but I could not.

I believe that the LogViewer was reading a execution0.log file located in the Reports folder. In my case, the file had the size of 3.12 megabytes. The files was this big because I executed a long running test. I got irritated waiting for this loading to finish.


I suppose that the Katalon developers wanted to present the LogViewer as its full features. It resulted running tests slowly due to the processing overhead. How unfortunate!

I would do just the same as @Russ_Thomas does from now on.

@Jass

I hope that Katalon team to review the way how to present the Log Viewer.

I think the initial setting should be:

  1. show the Table View, not the Tree View
  2. in the Table View, do not select All. Select Warning, Failed and Error

in the hope that the users’ tests could run as fast as possible;

Not only in the Enterprise version, but in the Free version, tests should run fast.

1 Like

I am not sure about this.
It may be true in the case of a test suite report, but i don’t find such file being created when i execute only a test case.
The detailed info from a test-case execution may be stored in a different place … and further aggregated with the data from execution0.log (although this file contains also a lot of data)
But yeah, looks like switching from table view to tree view is doing some log processing.
Have to dig more.

LE: I mean, I am not sure if only the data from this file is needed for log-viewer, or it is accumulated also in some other place.
The data from a given test-case seems to be accumulated in memory up to now, until i find other evidences.
So the question is … once flushed to execution0.log and rendered by the log viewer, it is released from the memory?

An example of execution0.log file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2021-11-21T18:42:48</date>
  <millis>1637487768056</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>
...

Please find the name logger.dtd. This implies that this file is created by the Java Standard Logging framework. See

You are right. The detailed info is managed by the Java Logging framework somewhere, somehow during a Test Suite is running.

Once a Test Suite finished running, I suppose, Katalon Studio calls the framework API to serialise the detail log into execution0.log file. Then the Logging framework retrieved the detail log from somewhere and format it into an XML text file.

Yes, the heap memory is released, the garbage collection working fine, as far as I observed using VirtualVM tool.

Aha, so this may explain the log viewer behavior.
In tree view mode looks like it is rendering some ‘memory unfriendly’ widgets, compared with the table view which displays only text lines

Now, I have to find a tweak to close the log-viewer completely in free version :smiley:

Yesterday, I happened to erase the Log Viewer somehow. With having no Log Viewer in GUI, I started a Test Suite. Then Katalon Studio got frozen. Poor guy! Katalon Studio can not live without it.

1 Like

Most probably, under the hood, the log viewer it is using something like:
https://python-gtk-3-tutorial.readthedocs.io/en/latest/treeview.html#the-view

HA!
I managed to turn it off.
Right click on the tab, Detach and close the window.
Now I run my suite only with console :smiley:
detach

Of-course, after I close Katalon and open it again, Log Viewer is back … but at least it didn’t freeze.
Well, I have only one testcase in a suite, but worth to try with larger suites, provided won’t crash, and compare the memory usage.

Yes, I tried detaching the Log Viewer. I found, I could even close the detached window.

I had a Test Suite with Log Viewer in Tree mode, which ran in 5 min 37 seconds.

When I detached the Log Viewer and closed it, the same Test Suite ran in 0 min 25 seconds.

10 times and more faster!

This difference is ridiculous.

1 Like

May be I am wrong. Possibly the test suite was running silently, and I just missed any sign of progress.

You should see some activity in the console and in the ‘job progress’.
Or could be it was a corner-case and it actually crashed, we know sometime Katalon has strange glitches and once restarted is fine again.

Cool. :sunglasses:

Upgrades – no upgrade has ever changed the setting, for me.

Table view? I call it log view if I need to name it. It’s kind of a filtered log view, if anything. I just wish I could make suite logs do the same thing:

image

I do that with Self Healing – annoying.

actualy, are two different ways on how a certain ui widget render and display the data.
i will provide some more explanations on how such stuff works. i am not an expert on gtk ui programming (i played only with qt / qml) but seems like it is using the same signal and slots mechanism to update the model in use and when the tree wiew widget receives the signal ‘data updated’ from the data provider, it will refresh the widget.
since the widget is ‘visible’ (i mean present) , it aquires runtime ‘interrupts’.
once the window / widget it is killed, it is no longer wasting time for the main runtime loop

1 Like

so, in ‘tree view mode’ the widget has to render icons, treat the parent / child relationships and so on.
which creates a complex enough model in memory for a single item.
in ‘table view’ it will only render simple text boxes arranged in rows

Exactly. :trophy:

Yes. Therefore ‘tree view’ is memory-hungry. Users should prefer the ‘log view’ to ‘tree view’ for faster processing.

Users should not try to switch from the ‘log view’ to the ‘tree view’, as it will take long time to “load logs” from the execution0.log file. If a execution0.log files has 3 megabytes size, ‘loading logs’ takes 60 seconds.

A derivative from this thread:

1 Like

As for memory usage, I think that Log Viewer is not fatal. It will not stop your tests running. :wink:

Log Viewer will just make your tests run slow. :persevere:

See this: