- 软件大小: 2.30MB
- 软件语言: 英文
- 软件类别: 国外软件 | 办公软件
- 运行环境: 2000/Xp/2003/Vista/Win7
- 授权方式: 免费版
- 软件等级:
- 更新时间: 2013/7/2 11:08:37
- 开 发 商:
软件介绍:
QC导出到excel文件所使用的插件,欢迎大家下载,导出缺陷、用例所必须
从QC里导出测试用例到EXCEL的办法及导出乱码的解决办法
相信有很多同学会要用这个功能。
这个方法无法导出测试用例的层级,也无法导出测试用例的步骤,只能导出视图上已有字段内容。
1、进入测试计划,点击视图->测试网格
2、填写筛选条件,选出你要的测试用例
3、如要全部导出,右键点击一条测试用例选导出->全部,输入文件名,默认.xls文件 保存即可
如要部分导出,用ctrl或shift选中你要导出的用例,右键点击一条选中的tc选导出->选定,输入文件名,默认.xls文件 保存即可
这时候,查看导出的excel,貌似大部分会是乱码。
解决方法如下:
在上述第三步时,输入文件名后,保存类型选择为 .htmll文件,保存好后再用excel打开即可解决乱码问题。
读取QC中的bug列表输出到Excel报表中
把qc服务器上bug输出到本地excel表中,利用Quality Center Open Test Architecture API -OTA COM 9.0编写脚本代码读取服务器上bug列表,以下代码在vb中编写,调试通过。
注意:The OTAClient.dll (OTA COM 9.0 Type Library) 从服务器上下载后保存在你本机文件夹
\Program Files\Common Files\Mercury Interactive\Quality Center下。
代码:
Dim QCConnection As TDConnection
Dim BugFactory As BugFactory
Dim BugList
Dim Bug As Bug
Dim Row As Integer
Dim Excel, Sheet
On Error GoTo makeConnectionErr
If (QCConnection Is Nothing) Then
Set QCConnection = New TDAPIOLELib.TDConnection
End If
If (QCConnection Is Nothing) Then GoTo makeConnectionErr
QCConnection.InitConnectionEx "http://192.168.1.180:8080/qcbin"
QCConnection.Login "pcl", ""
'DEFAULT = Domain, QualityCenter_Demo = Project
QCConnection.Connect "深圳博为峰信息技术有限公司", "mis"
If QCConnection.Connected = True Then
Debug.Print "Connection Success"
If QCConnection.LoggedIn = True Then
Debug.Print "Logedin"
If QCConnection.ProjectName <> "mis" Then
If QCConnection.ProjectConnected = True Then
Debug.Print "ok"
End If
End If
End If
Else
MsgBox "Connection Failed"
End If
'Check status.
Set BugFactory = QCConnection.BugFactory
Set BugList = BugFactory.NewList("")
Set Excel = CreateObject("Excel.Application")
Excel.WorkBooks.Add
Set Sheet = Excel.ActiveSheet
Row = 1
Sheet.Cells(Row, 1).Value = "BG_BUG_ID"
Sheet.Cells(Row, 2).Value = "Summary"
Sheet.Cells(Row, 3).Value = "DetectedBy"
Sheet.Cells(Row, 4).Value = "Priority"
Sheet.Cells(Row, 5).Value = "Status"
Sheet.Cells(Row, 6).Value = "AssignedTo"
Row = 2
For Each Bug In BugList
Sheet.Cells(Row, 1).Value = Bug.Field("BG_BUG_ID")
Sheet.Cells(Row, 2).Value = Bug.Summary
Sheet.Cells(Row, 3).Value = Bug.DetectedBy
Sheet.Cells(Row, 4).Value = Bug.Priority
Sheet.Cells(Row, 5).Value = Bug.Status
Sheet.Cells(Row, 6).Value = Bug.AssignedTo
Row = Row + 1
Next
Excel.ActiveWorkbook.SaveAs ("c:\QualityCenter_DEFECTS.xls")
Excel.Quit
Set Excel = Nothing
Set BugList = Nothing
QCConnection.ReleaseConnection
Set QCConnection = Nothing
makeConnectionErr:
Debug.Print Err, fName, Err.Descrīption & vbCrLf & errmsg
关键字: QC导出到excel