07-30-2008, 01:51 PM
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
'Add a new, empty defect
'These are user defined fields
'Clean and and release resources
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
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
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