Forum Discussion
The best way to do this on a TestItem level is to implement the "OnLogError" event and in that event use the Builtin.SendMail() funtion in order for you to send an email as soon as an error occurs in a TestItem without even waiting for the entire test to complete.
Cheers
Lino
- nisgupta5 years agoValued Contributor
Thanks for the updates
This is what I am doing. invoking onlogerror when there is error in testItem. Then in onStpTest Events trigger the email . But which testlog we have to attach ?
NG
- LinoTadros5 years agoCommunity Hero
in the event itself, you can figure out which TestItem caused the event to happen
Log.Message(Project.TestItems.Current.Name);
Cheers
Lino
- nisgupta5 years agoValued Contributor
Thanks for the updates . Yes we can use Log.Message(Project.TestItems.Current.Name);
to retrive the current TestItem. But how can we get the Test log for this current TestItem ?