Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email from qtp to Microsoft outlook through vb script
#19
Solved: 11 Years, 4 Months ago
I have worked on some other script .

This will post the empty defect from qc to outlook.

Noe i need a script if i get a bug in qtp how to post to qc immedialtely
'Create connection
Code:
Dim QCConnection
Set QCConnection = QCUtil.QCConnection
Set BugFactory = QCConnection.BugFactory
'Add a new, empty defect
Code:
Set bug = BugFactory.AddItem (Nothing)

bug.field("BG_SUMMARY") = defect_summary '"test adding a new defect from QTP as well as automatic e-mail functionality"
bug.field ("BG_STATUS") = "New" '--Default
bug.field ("BG_DETECTED_BY") = siri
bug.field ("BG_DETECTION_DATE") = date() 'Default to current date
bug.field ("BG_DESCRIPTION") = "Requirement = '"&req&"Reporting defect of QC through mail from QTP to the USER "&defect_desc'"This is a test entry from automation, QuickTest Pro. The actual result did not meet the expected result. The Analyst, Developer (Assigned To person) and Tester (Deteted By person) should get an email of this defect automatically."
bug.field ("BG_RESPONSIBLE") = sam  '"georgeslauture" 'Assigned To field
'These are user defined fields
Code:
'bug.field ("BG_USER_02") = sam "Analyst field
'bug.field ("BG_USER_04") = "Testing" 'Introduced By field -- DEFAULT
'bug.field ("BG_USER_05") = req'Requirements field
'bug.field ("BG_USER_03") ="Automation" 'Found In field - 'Default
''install_date = DateAdd("d",30,date())
'bug.field ("BG_USER_06") = install_date 'Install Date field
bug.Post 'commit to creating defect

'Clean and and release resources
Code:
Set BugFactory = Nothing
Set bug = Nothing
Reply


Messages In This Thread
RE: Email from qtp to Microsoft outlook through vb script - by siri - 07-30-2008, 01:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Send automatic email notification when test run started helmzshelmz 0 1,080 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  How to attach HTML file to Email Naresh 0 3,070 04-06-2015, 02:04 PM
Last Post: Naresh
  Help getting Sender Name from Email nidhitaneja 0 2,082 06-15-2014, 09:03 AM
Last Post: nidhitaneja
  Clicking a link in an outlook email using QTP kirti 0 5,623 06-15-2014, 01:25 AM
Last Post: kirti
  How do I save name and email address in QTP ? Shiv Y 1 2,500 12-19-2013, 07:24 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 2 Guest(s)