2011-03-07 46 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