How to upload attachments in HP ALM using UFT

160 views
Skip to first unread message

Rathna Bharathi

unread,
Dec 1, 2021, 1:45:53 PM12/1/21
to QTP - HP Quick Test Professional - Automated Software Testing
I have a requirement like need to filter run ID and attach screenshots as well as add expected and actual results in the ALM Test Run. I used the below code. I got run time error as "Unexpected empty parameter". Could you please any one help.

dim objSfact
dim objOrun
dim mystep

Set objOrun = QCutil.CurrentRun

Set objSfact = objOrun.StepFactory
Set att = objSfact.AddItem(null)
att.name = aStepname
att.post

Set steplist = objSfact.NewList("SELECT * FROM Step WHERE
ST_STEP_NAME='" & aStepname & "'")
For each mystep in steplist
mystep.Status = aStatus
myStep.Field("ST_DESCRIPTION") = aDesc
myStep.Field("ST_EXPECTED") = aExpected
mystep.Field("ST_ACTUAL") = aActual

If mystep.Status = "Failed" then
objOrun.Status = "Failed"
end if

mystep.Post
Next

Set objSfact = Nothing
Set objOrun = Nothing

Thanks & Regards,
Bharathi K.

Reply all
Reply to author
Forward
0 new messages