i took the below code from forums. The step wise results are getting updated properly. But the Status in the Execution Grid is shwoing Passed even if a Step has failed inside.

Pls help me out. Am not familiar with OTA.

Set rn = QCUtil.CurrentRun
Set ts = QCUtil.CurrentTestSet
Set qcobj = QCUtil.CurrentRun.StepFactory
Set mystep = qcobj.AddItem(NULL)
mystep.Field("ST_STEP_NAME") = StrStepNo
mystep.Field("ST_DESCRIPTION") = StrStepDesc
mystep.Field("ST_EXPECTED") = StrExpecRes
mystep.Field("ST_ACTUAL") = StrActRes
mystep.Field("ST_STATUS") = StrStatus
If mystep.Field("ST_STATUS") = "Failed" Then
ts.Field("TS_EXEC_STATUS") = "Failed"
rn.Field("RN_STATUS") = "Failed"
End If