Forum Discussion

jcabelloa's avatar
jcabelloa
Occasional Contributor
5 years ago
Solved

Transfer property from Run_test_step_1 to Run_test_step_2

Hi,

I'm trying to pass a property value from one "Run" test step output to another "Run" test step input.

So let's say I have "Run_TestStep1" that returns properties "prop1" and "prop2".

I want to take this "prop1" and "prop2" values and send them to "Run_TestStep2" as inputs, so "Run_TestStep2" uses those values on run time as inputs.

 

I tried using groovy as follows:

def fundingSourceId = context.expand( '${Run_Create_PrePaid_Acc#fundingSourceId}' )
testRunner.testCase.getTestStepByName("Run_Make_Payment").setPropertyValue("fundingSourceId", fundingSourceId)

def customerAccountId = context.expand( '${Run_Create_PrePaid_Acc#customerAccId}' )
testRunner.testCase.getTestStepByName("Run_Make_Payment").setPropertyValue("customerAccountId", customerAccountId)

but this code is not working. My "Run_Make_Payment" runs with empty values for the properties I transferred using groovy code.

 

Please, help.

Regards,

Joaquin.

3 Replies