'Retreive Defect properties
Dim td
Dim bfact 
Dim bList 
Dim Sev(10000)
Dim Id(10000)
Dim openDate(10000)
Dim closeDate(10000)
'Connect to QC 
Set td=createobject("TDApiOle80.TDConnection.1")
td.InitConnectionEx "http://qcbin/start_a.htm"
td.ConnectProjectEx "DEFAULT", "", "",""
'Retrieve all defects and display the summary of the defects. 
Set bfact = td.BugFactory
Set bList = bfact.NewList("") 
i = 0
For Each Bug In bList
 intId = Bug.Field("BG_BUG_ID")
 If intId = "4" Then
  Id(i) = Bug.Field("BG_BUG_ID")
  Sev(i) = Bug.Field("BG_SEVERITY")
  openDate(i) = Bug.Field("BG_DETECTION_DATE")
  closeDate(i) =  Bug.Field("BG_CLOSING_DATE")
  i = i + 1
 End If
Next 
td.DisconnectProject
td.ReleaseConnection 
Set bList = Nothing
Set bfact = Nothing
Set td = Nothing
No comments:
Post a Comment