testing - 质量中心 : link to attachment

标签 testing hp-quality-center

在惠普质量中心, 我有一个测试用例,其中附有一些文件。 我想直接调用其他测试用例(不是测试用例)的附件。 有人可以帮忙吗?

最佳答案

您可以定义一个自定义操作(将显示为附加按钮),并在用户单击该图标时使用 OTA API 检索您想要的附件。

(自从我使用 QC 工作流以来已经有一段时间了,对于可能的语法错误表示歉意,但它证明了这个想法)

通过 UI 添加新的操作按钮(我们称之为“getMyFiles”)。在那个 catch 事件之后——用户点击了按钮:


Function ActionCanExecute(Action) 
...
if Action = "getMyFiles"
    getMyFiles
end if
...
End Function

现在检索附件并用它们做任何你想做的事(例如打开...复制...保存在某处)


Sub getMyFiles
    Set tst = TDConnection.TestFactory.Item(##id of the test with attachments##)
    Set attf = tst.Attachments
    ' From here you can do whatever you want with those attachments
    ' In my example I will just download them:
    Set attLst = attf.NewList("")
    For Each att In attLst
        ' Don't remember what those parameters mean (took from old example), 
        ' so check OTA API guide
        att.Load True, "" 
    Next
End Sub

原来如此

关于testing - 质量中心 : link to attachment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5220033/

相关文章:

testing - 使用 .NET Core 和 NUnit 进行集成测试

testing - Rational Test Workbench if 条件

java - 服务器返回 HTTP 响应代码 : 500 for URL for GET request

testing - QTP、QC、Load Runner 和 RFT 教程

java - 使用 OTA 从测试计划中获取测试用例

testing - 为什么要在嵌入式容器中测试 ejb3?

数组的PHP组合

python - 使用 QuickTest Pro 获取对 Quality Center API 接口(interface) ISupportCopyPaste 的引用

java - 我将如何在 scala 程序中编译和执行 java 程序?

java - 使用 REST API 更新 QC ALM 缺陷注释部分