Email Template Documentation and Test Case Variables?

I can’t seem to find the documentation for the screen below (i’m using version 5.4.1)

Specifically I would like to know what other variables can I use here besides the ones shown, can I use any variable from my test cases?

As an example, I would like to add a line with ${TestCaseMessage} then append text to this variable throughout my test cases and have this information included in the email, is this or something similar possible?

k_Email_Template.png

Hi Dave,

Yes, you can use any variable in your test case, whether if it’s private, local or global.

You can refer to this link, this is all about Katalon variable usage.
https://docs.katalon.com/display/KD/Variable+Types

Regarding to your example ${TestCaseMessage} you can use that in xpath so you can append a value to that variable.

Hope that helps.

Hi Arnel,

I tried it out, I created TestCaseMessage as a global variable in the default (only) profile, when I did this:


and then clicked send test email I got this:

When I ran a test case that sets this global variable to a string like “test message” from a test suite no email was sent

I then tried:

Clicking send test email produces this:

The documentation you referenced was just about using variables and global variables in a test case, nothing about using them in an email template as I was asking.

k_Email_Template1.png

k_Email_Template_Error.png

k_Email_Template_Global.png

k_Email_Template_Global_Error.png

dave said:

Hi Arnel,

I tried it out, I created TestCaseMessage as a global variable in the default (only) profile, when I did this:


and then clicked send test email I got this:

When I ran a test case that sets this global variable to a string like “test message” from a test suite no email was sent

I then tried:

Clicking send test email produces this:

The documentation you referenced was just about using variables and global variables in a test case, nothing about using them in an email template as I was asking.

You can refer to supported variables in the email template from this page:
https://docs.katalon.com/display/KD/Emails+Settings

|
Variable

|

Description

hostName
os
Browser
deviceId
deviceName
suiteId
suiteName
totalTestCases
totalPassed
totalFailed
totalError
1 Like

Ok, Thanks Vinh,

Basically there is currently no way to pass custom data.

Can this be added as a feature in a future version?

8 Likes
  • 1 for this feature
    If Katalon email sending feature is to be of any use for us, the ability to include custom variables and global variables in email template is a must thing .

When we run the suite collections from CI server, we definitely would like to see information like ${testSuiteCollection} ${testEnvName},${appBuildInfo} etc in the mail notification. Otherwise email is of no much use

Thanks

Any solution for this ? like we have to modify Html report according to env and this is only can happened with dynamic variable like we can pass the html report heading or any other info from profile.

Hello Everyone ! After an execution of a test suite, a report is published in Katalon Analytics with the last Executions
Every execution has an ID.
how can i get this ID of the Execution to build a dynamic link to Katalon analytics of my last execution report and to put it in the Email?