Hi,
excuse me but if you have more than one step which information you'd like to store into the TSTest object Field?
You have also to understand that ManualRunner module is different from the others module. To pass data from Run/Step object Field to others Entity you have to do some manipulations.
Maybe what you need is to update TSTest Field with the value of a certain Step Field of a particular Step. The particular Step is retrieve only if another field is not empty. So only one Step must have the "ST_USER_02" field sets to some value.
You could use the Step_FieldChange Sub to update the TSTest Field (the field of the TestCase Instance):
Sub Step_FieldChange(FieldName)
On Error Resume Next
Dim myTestInstance
if FieldName = "ST_USER_02" then
'Check if Step Status is OK
if Step_Fields("ST_STATUS").Value = "Passed" then
'Retrieve the object rappresent the Instance (I don't try this but it would be right)
set myTestInstance = TDConnection.TestSetFactory.Item(Run_Fields("RN_CYCLE_ID").Value).TSTestFactory.Item(Run_Fields("RN_TESTCYCL_ID").Value)
myTestInstance.Field(TC_USER_01") = Step_Fields(FieldName).Value
myTestInstance.Post
myTestInstance.Refresh
set myTestInstance = Nothing
end if
end if
On Error Goto0
End Sub
2 things:
1. maybe the myTestInstance object is obtained directly from TDConnection.TSTestFactory.Item(Run_Fields("RN_TESTCYCL_ID").Value)
2. I think that the update of the TestInstance is better after the "End Run" Action and the Run informations are posted to the Tables (RUN and STEP).
Ciao,
Massimo.