Dk_3108
3 years agoOccasional Contributor
Capturing Test Case Name while generating mail
Hi ,
I have a scenario where failed test case name to be captured in the mail subject which gets generated when there is a test failure.
I have used "OnLogError event" to generate email when ever the test fail by using the below script as mentioned in Support document.
def Test(): if SendMail("ClareJ@clarejeffersoncorp.com", "mail.johnsmithcorp.com", "John Smith", "JohnS@johnsmithcorp.com", "Notification", "Hello Clare, Your application is nice.", "C:\\File1.txt", "C:\\File2.txt"): Log.Message("Mail was sent") else: Log.Warning("Mail was not sent")
Is there any way to capture the name of the test case name in the mail that gets generated on test failure?
Thanks