未来已来

QTP 和QC 的整合 - 运行结束后自动提交bug的方法

上一篇 / 下一篇  2008-08-09 15:08:50 / 个人分类:测试流程

 

   在自动化测试过程中,发现问题需要对其进行保存和提交,下面是利用qtp的自动提交缺陷到qc中,代码如下: 

      Dim TDConnection

      Set TDConnection = CreateObject("TDApiOle.TDConnection")

      TDConnection.InitConnectionEx "http://192.168.1.180:8080/qcbin"
      TDConnection.Login "pcl", ""
      TDConnection.Connect "深圳博为峰信息技术有限公司", "mis"
      If TDConnection.Connected Then

          MsgBox("Connected to " + chr (13) + "Server " + TDConnection.ServerName+ chr (13) +"Project " + TDConnection.ProjectName )

     Else

       MsgBox("Not Connected")

End If

    Set BugFactory = TDConnection.BugFactory

     Set Bug = BugFactory.AddItem (Nothing)

    Bug.Status = "New"

       Bug.Summary = "Connecting to TD"

       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.Post

     set Bug=nothing

    set TDConnection =nothing


TAG: 测试流程

大师兄--绝迹江湖 引用 删除 songfun   /   2008-08-09 21:54:24
哥们,又被你抢先了,心有灵犀啊,你怎么知道我想写这篇文章捏,哈哈
 

评分:0

我来说两句

Open Toolbar