2011-03-07 44 views
0

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

回答

1

您可以定义自定义操作(将显示为附加按钮),并使用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 

这是对它

+0

我甚至不知道从哪里添加QC UI的新动作按钮:( – Pradeep 2011-03-08 06:41:07

+0

我得到了OTA指南..将参考并尝试实施。 – Pradeep 2011-03-08 07:21:58

+0

工作流程在自定义模块中 – 2011-03-08 12:57:42