0

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,

Koby Douek
  • 16,156
  • 19
  • 74
  • 103
Tom
  • 411
  • 12
  • 28

2 Answers2

2

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
Tom
  • 411
  • 12
  • 28
1

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.

Alex Shnayder
  • 1,362
  • 1
  • 13
  • 24