william_roe
10 years agoSuper Contributor
Getting Name of Failed test in OnLogError Event
How do you get the name of the test which initiated the error log posting? The sender in the following code is always "GeneralEvents". The callstack would be even better.
function GeneralEvents_OnLogError(Sender, LogParams){ var body = "Sender: " + Sender.Name + "\r" + "Message: " + LogParams.MessageText + "\r" + "Additional Text:" + LogParams.AdditionalText; SendMail(Project.Variables.MailRecipientList, "relayserver", "Automated Test Server", "donotreply@sbdinc.com", "Automated Test Failed", body); }
Evidently R&D is looking at adding that feature now. There are some suggestions in this thread for workarounds.