Micro Focus QTP (UFT) Forums
To send Fail Results to mail - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: To send Fail Results to mail (/Thread-To-send-Fail-Results-to-mail)



To send Fail Results to mail - Naresh - 04-22-2015

Hi all,

Can any one know how to send only Fail Results to mail


RE: To send Fail Results to mail - babu123 - 04-23-2015

if the test step is failed call one more function in failed case and create a fail testcase report same like passed/failed and store it in a specific location. one location for combination of pass and failed and one location for failed only....

Code:
public function mail()
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'MailItem
With MyItem
.To = "test@test.com"
.Subject = "test"
.ReadReceiptRequested = False
.HTMLBody = "A Fail created!"
'.display
'SendKeys "%{s}", True
'Type alt+micEnter

.Attachments.Add("attach fail location file. ")
.Send

End With
End function