质量中心:附件链接

发布于 2024-10-20 16:29:22 字数 68 浏览 0 评论 0原文

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

In HP Qualtiy Center,
I have a test case where I have attached some documents.
I want to call directly the attachment from other test cases(not the test case).
Can somebody help out?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月打碎记忆 2024-10-27 16:29:23

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

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

通过 UI 添加新的操作按钮(我们称之为“getMyFiles”)。在该捕获事件之后 - 用户单击按钮:


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

就是这样

You can define a custom action (which will appear as additional button), and use OTA API to retrieve attachments you want when user clicks on that icon.

(it's been a while since I worked with QC workflow, so apologies for possibly wrong syntax, but it demonstrates the idea)

Add new action button through UI (let's call it "getMyFiles"). After that catch event - user clicked the button:


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

Now retrieve the attachments and do whatever you want with them (e.g. open...copy...save somewhere)


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

That's about it

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文