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

**URL:** <https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948>\
**Category:** Integrations\
**Tags:** integrations, katalon-studio\
**Created:** [January 19, 2018, 6:38pm UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948 "2018-01-19T18:38:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ai\_test](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ai\_test](https://forum.katalon.com/u/ai_test)\
**Post date:** [January 19, 2018, 6:38pm UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/1 "2018-01-19T18:38:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ai\_test](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ai\_test](https://forum.katalon.com/u/ai_test)\
**Post date:** [January 19, 2018, 6:55pm UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/2 "2018-01-19T18:55:53Z")

</div>

Looking at this tread, [http://forum.katalon.com/discussion/4701/email-report-template-issue/p1](http://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?

---

<div class="post-metadata">

**Author:** ![ai\_test](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ai\_test](https://forum.katalon.com/u/ai_test)\
**Post date:** [January 23, 2018, 7:15pm UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/3 "2018-01-23T19:15:36Z")

</div>

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](https://app.box.com/s/xaovt51m8bi26e00nhsmh644tmsfem9v "Link: https://app.box.com/s/xaovt51m8bi26e00nhsmh644tmsfem9v")  
(not sure why I can’t attach image anymore)

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [January 24, 2018, 2:59am UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/4 "2018-01-24T02:59:28Z")

</div>

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

```auto
import com.kms.katalon.core.logging.KeywordLogger
KeywordLogger logger = new KeywordLogger()
logger.logInfo(yourMessage)

```

---

<div class="post-metadata">

**Author:** ![ai\_test](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ai\_test](https://forum.katalon.com/u/ai_test)\
**Post date:** [January 24, 2018, 5:47pm UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/5 "2018-01-24T17:47:43Z")

</div>

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.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/2l/mi8qa143pqy9.jpg "Image: https://s3.amazonaws.com/katalon-forum/editor/2l/mi8qa143pqy9.jpg")

[k-template-question-2.jpg](https://s3.amazonaws.com/katalon-forum/editor/2l/mi8qa143pqy9.jpg)

---

<div class="post-metadata">

**Author:** ![Muhammad\_Junaid](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@Muhammad\_Junaid](https://forum.katalon.com/u/Muhammad_Junaid)\
**Post date:** [February 26, 2018, 9:20am UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/6 "2018-02-26T09:20:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [February 26, 2018, 10:06am UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/7 "2018-02-26T10:06:51Z")

</div>

> [ai test](https://forum.katalon.com/profile/2823/ai%20test) 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.  
> ![](https://s3.amazonaws.com/katalon-forum/editor/2l/mi8qa143pqy9.jpg "Image: https://s3.amazonaws.com/katalon-forum/editor/2l/mi8qa143pqy9.jpg")

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

---

<div class="post-metadata">

**Author:** ![Grace](https://avatars.discourse-cdn.com/v4/letter/g/f17d59/32.png) [@Grace](https://forum.katalon.com/u/Grace)\
**Post date:** [September 12, 2018, 9:15pm UTC](https://forum.katalon.com/t/is-it-possible-to-print-global-variable-value-inside-html-report/8948/8 "2018-09-12T21:15:33Z")

</div>

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.
