How to show the print statement results in the test suite report?

Hi Team,

I have some println statements in the script which i would like to print the result in the testsuite report pdf while running in test suite execution.
I observed that only code lines are printing but not the result. here is a small example:

Code:
Variable = ‘Value I want to print’
println(’\n Printing this variable: ’ + Variable)

In Test Suite Report: I could only able to find,
println(’\n Printing this variable: ’ + Variable)

What I would like to show is:
println(’\n Printing this variable: ’ + Variable)
Printing this variable: Value I want to print

Hi friend,

I commonly use this way to watch the variable’s values in test suite. Please help to try with below code

import com.kms.katalon.core.util.KeywordUtil

def myVariable = “5”
KeywordUtil.logInfo(“My Value ${myVariable}”)

====================================================

  1. Create one test case with above code
  2. Put test case into test suite and run
  3. Observe html report or report log viewer, you are able to see the value

HTML:

Or
Log Viewer:

Or:
PDF

Hope it is useful.

FYI.