WebUI.comment no longer printing the comment to the log

## Operating System: Windows 10

## Katalon Studio Version: 5.9.1

**## Environment **Chrome

## Steps to reproduce

Declare a variable.** String **testString = ‘someText’

Run a test case with WebUI.comment(testString)

After the test case is run check the console/log for the printed value

Notice nothing is printed but the syntax is shown instead.

## Expected Behavior

comment: ‘testString’

## Actual Behavior

comment(testString)

1 Like

I reporoduced the problem.

I made the following test case

import java.time.LocalDateTime
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
def now = LocalDateTime.now()
WebUI.comment("Now it is ${now}!")
println("Now it is ${now}")

I got the following output in the log:

SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
2018-12-03 07:14:19.810 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
2018-12-03 07:14:19.815 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/TC1
2018-12-03 07:14:20.784 DEBUG testcase.TC1                             - 1: now = LocalDateTime.now()
2018-12-03 07:14:20.838 DEBUG testcase.TC1                             - 2: comment(Now it is $now!)
2018-12-03 07:14:21.116 DEBUG testcase.TC1                             - 3: println(Now it is $now)
Now it is 2018-12-03T07:14:20.837
2018-12-03 07:14:21.149 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/TC1

I expect WebUI.comment() also to emit a string “Now it is 2018-12-03T07:14:20.837!” but it doesn’t.

It seems that Katalon Studio 5.9.x has made WebUI.comment() useless. Any workaround?

1 Like

I have gone back to 5.8.6 that’s my workaround.

Honestly letting a bug like into production is unforgivable

@Katalon Studio When are you releasing a fix for this bug?

kazurayam
Ian Fraser

it may be related to the new logging feature:

https://docs.katalon.com/katalon-studio/new/version-590.html#new-status-bar-in-log-viewer-fka-progress-bar

Try setting the log level to TRACE.

If that is not working, as a workaround, use println for console output (usually I use WebUI.comment only to throw some data in the generated html report … so I cannot say the new behavior is disturbing …)

Also, you can try to use KeywordUtil.logInfo(). even if the purpose of it is for usage in custom keywords, should work in a testcase too.

https://api-docs.katalon.com/studio/v4.6.0.2/api/com/kms/katalon/core/util/KeywordUtil.html

1 Like

Ibus,

Thank you for your suggestion. I tried the following log.properties file setting and got WebUI.comment() output.

# This file is used to configure Katalon Studio execution log levels.
logging.level.com.kms.katalon.core=TRACE

However, I would argue that the output from WebUI.comment() should be regarded as INFO level. Therefore it should be emitted to the LogView even if logging.level.com.kms.katalon.core is set DEBUG. Otherwise WebUI.comment() loses its raison d’etre.

1 Like

kazurayam said:

Ibus,

Thank you for your suggestion. I tried the following log.properties file setting and got WebUI.comment() output.

# This file is used to configure Katalon Studio execution log levels.

logging.level.com.kms.katalon.core=TRACE


  
However, I would argue that the output from WebUI.comment() should be regarded as INFO level. Therefore it should be emitted to the LogView even if logging.level.com.kms.katalon.core is set DEBUG. Otherwise WebUI.comment() loses its raison d'etre.  

  

I agree This should have been turned on by default

1 Like

well … yeah, this is another story, it’s just a matter of preferences.

personally i like less verbosity in the console by default … but based on other members voting this can be brought into the development team attention

Thank you for your feedback. The issue will be fixed in the next release.

Not sure if “will be fixed in the next release” meant 5.10 at the time, but I am still encountering this issue with Katalon Studio version 5.10.

I’m so glad I have not upgraded. I make extensive use of the logging and commenting systems as part of my customized reporting solution. This, I’m sure, would break my tests and put me on total shutdown.

@YoungNgo Please light a fire back there and get this fixed asap.

Dear guys, we’ll have the fix for this by early next week at the latest.

1 Like

Ver 5.9.0 changed the message format drastically:

I am afraid this change may have some implications to you, Russ.

Yep, thanks Kaz. I’m sure that’s true. I think I’ll wait until this bug is cleared - I don’t want to be chasing any problems that aren’t of my own making :crazy_face:

This has still not been addressed in Katalon Studio version 5.10.1.

now honestly. using reporting/logging info for further validations/customization’s is just a bad practice
we will always have the ‘chicken and egg’ problem: who is checking the checking code?

Who is claiming to do that?

Is it your opinion that using logs is a bad practice or are you quoting from an industry-respected source?

And that’s just pseudo-philosophical noise.

Hi @Shane_McGarry,
Please update your version to the latest 5.10.1.
I’ve checked your issue and found that WebUI.comment() now can print the comment to the log.

3 Likes

Loan_Tran,

I have updated my Katalon Studio to 5.10.1 and tried WebUI.comment(). I have confirmed that it can print the comment. Thank you.

4 Likes

My sincere apologies @Loan_Tran. After following your example, I see that I did not expand the comment command ("1 - comment(“The following can be […]”) in the Log Viewer and then click on the comment text (“The following can be […]”) that displays. This was not an option for version 5.10, as seen in the image from my original post, so I initially missed the change when I had seen missing text for my stored variables. Sorry.

I have confirmed on Mac (OS version 10.14.1) and PC (Windows 10 version 10.0.16299) that this has indeed been addressed and resolved. Thank you and your team for your assistance.

3 Likes