gpt4 book ai didi

testing - 质量中心 : link to attachment

转载 作者:行者123 更新时间:2023-11-28 21:34:26 26 4
gpt4 key购买 nike

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

最佳答案

您可以定义一个自定义操作(将显示为附加按钮),并在用户单击该图标时使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com