Is it possible to print global variable value inside html report?

Hello, I am sending a html report format for the test suite. I want to print a global variable value (string array) inside the report, is this possible? If so what is syntax from inside email template?

I have tried editing the email template and add the global variable name but looks like it does not send email when I do this and I don’t see any error in the Console tab. If I remove my global variable from template then it send email okay.

Looking at this tread, https://forum.katalon.com/discussion/4701/email-report-template-issue/p1, looks like that is not possible.

So follow-up question is can I write the to pre-defined variable like ‘os’ inside test case?

After searching the forum, I just want to clarify my question. I do not want to modify the actual html reported generated by Katalon, but rather in the html email content.
https://app.box.com/s/xaovt51m8bi26e00nhsmh644tmsfem9v
(not sure why I can’t attach image anymore)

If you want to print your Global Variables (or any other information) just use below function. It will directly write a new line based on its called level in HTML report.
I’ve also edited this category to allow users to upload file directly

import com.kms.katalon.core.logging.KeywordLogger
KeywordLogger logger = new KeywordLogger()
logger.logInfo(yourMessage)
1 Like

Hi Vinh, thanks for the reply but that is not what I am after.
I just want to print inside the email body along with the template, so that other people does not need to search/read the attachment file.

k-template-question-2.jpg

1 Like

Hello all ,
I have executed a test suite , the running time was approx, 48 hours. Now when it come to test suite report , there is no report in report folders but only screenshots are there , how to get report (execution log) in such situation any idea?
#Execution test suites

ai test said:

Hi Vinh, thanks for the reply but that is not what I am after.
I just want to print inside the email body along with the template, so that other people does not need to search/read the attachment file.

No you can’t add other variables here besides supported variables in the official documentation.

I want to add environment in the email subject line, for example:

Subject: Test Automation completed on ${valuable of executed environment}

Also, it will be best if I can add logic in subject so that Subject line prints Pass if all test pass, and Fail if there are failed test.