History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3631
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Phong Trinh
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Embed .html Report in notification email with condition

Created: 21/Oct/20 12:09 AM   Updated: 21/Oct/20 11:40 PM
Component/s: None
Affects Version/s: 9.0.48
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

 Description  « Hide

 I would like to embed an .html report in notification email with other test reports. This .html report is embedded only if it exists. May you please advise me on how to set the email template for this?

 Thanks in advance,

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [21/Oct/20 01:09 AM]
Do you want to embed full content of html report including style into email notification template? If so, it will require iframe which will not be allowed by most email clients.

Phong Trinh [21/Oct/20 03:20 AM]
 Thank you for promptly response, Robin. I would like to embed just contents of the .html report.

Robin Shen [21/Oct/20 06:01 AM]
Assume you want to include index.html in workspace into email notification:

#set($htmlPathRelativeToWorkspace = "/index.html" )
#set($htmlPath = "$configuration.workspaceDir.absolutePath$htmlPathRelativeToWorkspace" )
#if ($util.getFile($htmlPath).exists())

Phong Trinh [21/Oct/20 05:34 PM]
 Thank you very much, Robin. I am going to give this a try and will keep you informed.

Phong Trinh [21/Oct/20 10:03 PM]
This works fine for me. I made a small adjustment for using the report which was published to the server in one of the steps. Thank you very much.