标题: 写函数自动提交BUG [打印本页] 作者: denisye 时间: 2006-10-20 15:38 标题: 写函数自动提交BUG 正在写一个函数,希望能够在运行完QTP后,自动把产生的错误信息提交到TD服务器BUG库里。
代码如下:
Dim TDC
Dim BugFactory
Dim Bug
TDC = CreateObject("TDApiOle.TDConnection")
TDC.InitConnection("http://192.168.0.1/tdbin", "Denis") ' URL for the DB
TDC.ConnectProject("Denis40", "admin", "Denis") ' Valid login information
If TDC.Connected Then
MsgBox("Connected to " + Chr(13) + "Server " + TDC.ServerName + Chr(13) + "Project " + TDC.ProjectName)
Else
MsgBox("Not Connected")
End If
'Get the IBugFactory
BugFactory = TDC.BugFactory
'Add a new empty bug
Bug = BugFactory.AddItem(Nothing)
'fill the bug with relevant parameters
Bug.Status = "New"
Bug.Summary = "Login Fail"
Bug.Priority = "4-Very High" ' depends on the DB
Bug.AssignedTo = "admin" ' user that must exist in the DB's users list
Bug.DetectedBy = "admin" ' user that must exist in the DB's users list
'Bug.Severity = "4-Very High"
'Post the bug to DB ( commit )
Bug.Post()
TDC.ReleaseConnection()
此程序能正常执行并提交BUG,但我却找不到TD的BUG对象填写Description的接口,就是说我现在没办法把错误的信息填在BUG的Description字段上去,请问各位有热心的高手,有没办法解决这个问题?