TestNg Reporting

0 votes

I want to Email my TestNg report to other users as well but when they are clicking on the screenshot link. They are not able to see the screenshot as it is stored in my local machine.

How i can attach the screenshot so that other ppl can also view the report.

 String SaveandReturn =  ScreenShot.takeScreenShot("SaveAndReturnverification");
  Reporter.log("<a href=\"" + SaveandReturn + "\"><p align=\"left\"> Add Sub Service in LFA Services  screenshot at " + new Date()+ "</p>");

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (171 points)
selected by
0 votes
Best answer
You need to take screenshot, move it to your report directory and provide that path to Reporter.log. Also make sure while adding file to zip to email, you are including screenshots inside zip file.