How to send QTP test results to an email...(with out using
Quality Center)?

Answers were Sorted based on User's Feedback



How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / raj

Try this function

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

Is This Answer Correct ?    24 Yes 3 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / murali krishna

hi,

QTP will prepare the results in xml file format... if we
want to send the result...to mail.. By attaching the
respective file we can send it... if we want to send the
runtime data table... we can also attach it...

quality_muralikrishna@yahoo.com

Is This Answer Correct ?    11 Yes 6 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / bharath

Good framework should automatically send the test results to
all the stakeholders, once the test is complete.
Best approach would be using CDO object, it is not required
to install MS Outlook on the PC where test is getting
executed. Attaching the link.

http://bharath-marrivada.blogspot.com/2010/02/how-to-send-email-with-attachments.html

Is This Answer Correct ?    5 Yes 0 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / sreelaxmi

Save the test results in HTML format.
Navigation: FIle -> Export to HTML.
U will get the results in HTML format which is very much
understandable. U can mail this as an attachment.

Is This Answer Correct ?    2 Yes 2 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / allan

''' use Raj's code above (#5) modifying this line
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
'''

set listattach = wildFileList(".*4.*jpg")


for each n in listattach
Mail.Attachments.Add(n)
next 'n

Function wildFileList(regx) ', fext)
'step 1 string list of filenames
Dim fso, tmp, tmp1, folder, File, regEx, Match, Matches, n,
fext
fext = right(regx,3)
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.getfolder(".")
For Each File in folder.Files
If fso.GetExtensionName(File)= fext Then 'regx & fext
tmp = File & vbcrlf & tmp 'regx & fext & vbcrlf & tmp
End If
Next
'step 2 exec regex on raw string
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = regx ' Set pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
Set Matches = regEx.Execute(tmp) ' Execute search.
set wildFileList = Matches

End Function

Is This Answer Correct ?    0 Yes 0 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / a

¿forgot how to attach?
dim sScreenshotPath


sScreenshotPath = "c:\somepath\" ' with trailing slash
Desktop.CaptureBitmap sScreenshotPath & "Err_" &
Environment( "TestName") & "_" & sTimestamp & ".png"

Function sTimeStamp()
sTimestamp = Right( "0" & Month( Now ), 2 ) & Right( "0" &
Day( Now ), 2 ) & Right( "0" & Hour( Now ), 2 ) & Right( "0"
& Minute( Now ), 2 ) & Right( "0" & Second( Now ), 2 )

End Function

Is This Answer Correct ?    0 Yes 0 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / lakshman

In above, mentioned only attachment not how to save result
and sent it as an attachment .

Can you please explain with script clearly

Is This Answer Correct ?    0 Yes 2 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / freak

Function SendMailOutlook(strMailto, Subject, Message,
strMailfrom)

'Create an Outlook object
Dim Outlook 'As New Outlook.Application
Set Outlook = CreateObject("Outlook.Application")

'Create e new message
Dim Message 'As Outlook.MailItem
Set Message = Outlook.CreateItem(olMailItem)
With Message
'You can display the message To debug And see state
'.Display

.Subject = Subject
.Body = Message

'Set destination email address
.Recipients.Add (strMailto)

'Set sender address If specified.
Const olOriginator = 0
IfLen(strMailfrom) > 0 Then .Recipients.Add
(strMailfrom).Type = olOriginator

'Send the message
.Send
End With
End Function

Is This Answer Correct ?    7 Yes 10 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / issac

ANKITHA why dont u find some other job.and stop pestering

Is This Answer Correct ?    5 Yes 10 No

How to send QTP test results to an email...(with out using Quality Center)? ..

Answer / chinnu

Ankit, great answer.

Is This Answer Correct ?    5 Yes 27 No

Post New Answer

More QTP Interview Questions

how to merge object repositories in qtp for n different applications

1 Answers  


Which company is better amdocs or techm ???

2 Answers  


hi can any body give me a script for creating a modularity or keyword driven framework..i am working as a qtp tester for 2 months but still i am not exposed to framework in my company

0 Answers   Excel,


difference between GetROProperty and GetTOProperty

3 Answers   Wipro,


Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance

0 Answers  






in which situation u will use recording and in which situation u will used to write script manually

1 Answers  


I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian

0 Answers   Accenture,


How do client side image and server side image work?

0 Answers  


My Application is a client server application , but there is one functionality , when we click on one particular icon it launches web browser . When I am recording in QTP , By select approprait web add in also , it not able to record in web page , I am able to record till click on the icon. Please provide me how to over come this type of problem.

2 Answers  


can u tell me the the cost of automation tool QTP ?

7 Answers   Ducont, Sonata,


hi, Can any body tell me whats the difference between the QTP and the Rational Robat ad the Silk Test and LOad Runner and are they used in any Company On the Major scale bcas I finnf Many comapny Using the Manual Testing Only Hence Askin the Question Hope I will get the Assitence .

1 Answers   First Europa,


How do u override the meaning of a standard object in QTP?

1 Answers  


Categories