Send Mail/bug report while Testing

There might be situations where there will be a parallel testing and bug submitting. 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) 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 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.


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


Function SendMail(SendTo, Subject, Body, Attachment)
Set ol=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
If (Attachment <> "") Then
End If
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 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.
Send Mail/bug report while Testing Send Mail/bug report while Testing Reviewed by Animesh Chatterjee on January 21, 2009 Rating: 5

No comments:

Powered by Blogger.