I am executing test items and in the last of queue Email Test cases is there to send reports.
but problem is in Sendmail() function we need to provide parameter for file location. so this function will get that file and will send to respecttive userID.
My question is if I am providing file location details like "C:\Users\KO\Music\file1.mht"
then will it overide the log data here whenever I will execute my test items. if not then how i will be able to send my log data after test item execution.
Hope you get my point.
Please guide.
I don't understand what you want to do. Are you asking me:
1) The file you send to the disk will be deleted after you perform SendMail()?
2) Do you always want to take only the latest log file to sendMail()?
For these cases i built a path test\date based name and export to this path and i send mail the exported log.
The exported log contains also timestamp.
testexecute.mht -> exported to \results\myApp\03-19-2020\myAPP03-19-2020-100005.mht
But as @Wamboo i dunnot understand clearly what u want.
Un sourire et ça repart
@BenoitB is correct.... you best practice would be to make sure that your MHT file has a unique name each time it's created. That will prevent over-writing/replacement.
adding on to all of the other comments, I'd suggest using aqDateTime to get a timestamp (when you are initally creating these mht files) or using something lke ProjectSuite.TestItems.Current.ProjectName to get the relevant unique name for each of your runs.
Thank you! Great suggestions everyone!
@kaiiii please mark the most helpful reply a as solution. Thank you!
@kaiiii please let us know if you found out how to solve this. This would really help people in the long run Thank you.
Subject | Author | Latest Post |
---|---|---|