How to send the reportPath to the email template

Hi Andrej,kazurayam, Mate Mrse,Marek Melocik,RUSS …How to send the reportPath to the email template, at run time.

In the email template, I have placed a hyperlink: Click here, but how to send the report location in template.

I know Katalon supports only some few parameter as per the documentation

Is there any work around to handle this situation. Your help is highly appreciated

I am able to get the location of Reports directory generated at runtime using the below code.

import com.kms.katalon.core.configuration.RunConfiguration

reportPath=RunConfiguration.getReportFolder()

System.err.println(reportPath)

Email Report.png

1 Like

Hi,
i was thinking first - how to do that, but no idea except it should be implemented by @Katalon Studio team.
Then i start to thinking about usefull use case, when you can attach report ad pdf/html/csv to mail directly. Only UC that comes to my mind is: tests are executed from my PC and mail is sent to me … because there will be problem to access reports with that link from anywhere else but from PC that executed tests…
If you came with good UC, put that as request for improvement.

Hi Andrej, Thanks for prompt reply …

Use Case:

I run around 4-5 different tests unattended at mid-night using windows task scheduler.

The report file is more than 40 Mb size for each test. I need to send the email to a bunch of people. I have restriction not to send more than 2 Mb in my office.

I have got a logic to achieve it from the answer posted by Kazurayam. URL

/settings/internal/com.kms.katalon.execution.properties

Now my question is how to replace the text highlighted in the image at runtime , which would solve my problem.

OLD Text

//AutomationServer/CustomFolder/Reports/ProjectName-02-SEP-2018/report.html

Replace with New Text

//AutomationServer/CustomFolder/Reports/ProjectName-03-SEP-2018/report.html

Your help is highly appreciated …

PropertyFile.png

I’m also interested in this.
Is there any way to get the analytics url for a single test case?
So I can click the link instead of sending 10 MB mails to 5 people?

I was able to achieve it using the below tool.

This solution would work only via command line execution.

  1. Firstly, you should get the system date and time in batch file --> %Reportfolder%

  2. katalon -noSplash -runMode=console -consoleLog -projectPath="%userprofile%\FOCiS_Automation_Script\FOCiS_OF_AF_JA\FOCiS_OF_AF_JA.prj" -retry=0 -testSuitePath="Test Suites/JP Regression AGILE" -executionProfile="AGILE" -browserType="Chrome" -reportFolder="D:\Automation Reports\Smoke\%Reportfolder%"

  3. Using the Fart tool you can find and replace text in com.kms.katalon.execution.properties