51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1853|回复: 1
打印 上一主题 下一主题

[求助] 从QTP中运行脚本向TD增加defect例子,defect并没有增加进去 高手解答下

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-12-7 11:39:02 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
Dim TDConnection
Set TDConnection = CreateObject("TDApiOle.TDConnection")
TDConnection.InitConnection "http://linkage-renxq/tdbin" ' URL for the DB
TDConnection.ConnectProject "TestDirector_Demo_0","admin","" ' Valid login information

If TDConnection.Connected Then
  MsgBox("Connected to " + chr (13) + "Server " + TDConnection.ServerName _
  + chr (13) +"Project " + TDConnection.ProjectName )
Else
  MsgBox("Not Connected")
End If

'Get the IBugFactory
Set BugFactory = TDConnection.BugFactory

'Add a new empty bug
Set Bug = BugFactory.AddItem (Nothing)

'fill the bug with relevant parameters
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

'Post the bug to DB ( commit )
Bug.Post
执行的时候能够出现连接成功的提示框,但是在TD中并没有找到新增的defect
Results.qtp如下:
[T1]
Indent=0
EventType=StartRepLog
Type=HTML
NodeName=Incompatibility Error
IconIndex=1
Status=Done
Iteration=1
ReplayId=2
BottomFile=InstallNewReport.html
TopFile=
[General]
Total=1
Title=Incompatibility Error
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2007-12-7 13:00:52 | 只看该作者
关注高手回答
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-28 14:17 , Processed in 0.072012 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表