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?
Asked
Active
Viewed 1,668 times
1 Answers
1
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
-
I don't even know from where to add new action button on QC UI :( – Pradeep Mar 08 '11 at 06:41
-
I got OTA guide..will refer and try to implement. – Pradeep Mar 08 '11 at 07:21
-
Workflow is in Customization module – Mar 08 '11 at 12:57