Reputation: 411
Is there a way to upload defects into QC without using QCUtil? because the following can be used only when writing it in a QTP test, it is not working when written in a vbs file or in vba .
Dim QCConnection
Set QCConnection = QCUtil.QCConnection
Set BugFactory = QCConnection.BugFactory
Set Bug = BugFactory.AddItem (Nothing)
Is there an alternative for uploading defects to Quality Center other than using QCUtil?
Thank you in advance for your help,
Upvotes: 0
Views: 4148
Reputation: 411
Found the answer :). it is by the following code:
Set qtApp = CreateObject("QuickTest.Application") 'Create QTP Object
qtApp.TDConnection.Disconnect 'Disconnect TDConnection
qtApp.TDConnection.Connect QCserver, QCdomain, QCproject, QCuser, QCpassword, False 'Connect TDConnection
Set tdc = qtApp.TDConnection.TDOTA 'Set TDC Connection
set BugFactory = tdc.BugFactory
'Add a new, empty defect
Set Bug = BugFactory.AddItem(Nothing)
'Enter values for required fields
Bug.Status = "New"
Bug.Summary ="issues in verification"
Bug.DetectedBy = "Jeff"
Bug.Post
Upvotes: 2
Reputation: 1362
QCUtils is a wrapper for QC api called OTA. You can use it directly from any thing that can consume COM.
There is a Chm help file with examples for OTA in QC help page.
Upvotes: 1