Send Mail/bug report while Testing


There might be situations where there will be a parallel testing and bug submitting.
means...you will be testing say 10000 data and say 9th position u got an error.Developers wants the bug right now to track or to note(Generally what happens if a testing process going on developer never touch the instance)...so they might need the data for fixing those in other instance


so if you want to let developers and other team member know about the bug ........well...you need to code accordingly.


I found this technique very effective for speeding up the Testing process


Below are the two methods for sending email using the VBScript code in QuickTest Professional, and two different COM objects.


TYPE-1




Function SendMail(SendFrom, SendTo, Subject, Body)
Set objMail=CreateObject("CDONTS.Newmail")
ObjMail.From = SendFrom
ObjMail.To = SendTo
ObjMail.Subject = Subject
ObjMail.Body = Body
ObjMail.Send
Set objMail = Nothing
End Function



TYPE-2


Function SendMail(SendTo, Subject, Body, Attachment)
Set ol=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
Mail.Send
ol.Quit
Set Mail = Nothing
Set ol = Nothing
End Function




you can include the screenshot as well.
Checkout my HTML reportout for screenshot capturing.




well now the question is where this code will be placed.I have a solution for it.
There are two places where you can place this code.
1.if the problem / bug known to you.....then it is easy.place accordingly to the "if" condition.


But if the bug or any unexpected error comes write a recovery scenario...write a small function named send_mail and place the code under it.




Let me know if it is ok for you.
About the author :
author

This post was written by: Animesh Chatterjee. Animesh is a professional blogger, web designer and frontend web developer. Animesh is an enthustic and have passion to share his idea and creativity with this blog and provide tricks, tips and information for visitors. Thanks for visiting. You can follow Animesh in the following channel

You may also like :

{ 0 comments... read them below or add one }

Post a Comment