Ask a Question

Transfer property from Run_test_step_1 to Run_test_step_2

SOLVED
jcabelloa
Occasional Contributor

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 3
MarcusJ
Moderator

Hi,

 

If you are using the Run testcase test step did you select the properties to be returned in the test step to save their property values?

 

https://support.smartbear.com/readyapi/docs/soapui/steps/run-test-case.html

 

Regards,

Marcus

SmartBear Support


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
jcabelloa
Occasional Contributor

Hi Marcusj,

Yes I selected the properties to be returned in the test step to save their property values.

And that part works fine, BUT after that is done I want to use those properties values to send them to another Run test step (as inputs). That part, I don't know how to do.

Any advise would be very welcome.

Thanks,

Joaquin.

Radford
Super Contributor

Take a look at the following comment I made on another thread:

 

https://community.smartbear.com/t5/SoapUI-Pro/Need-help-to-modularizing-tests-using-soapui-pro/m-p/1...

 

Hopefully this should answer you question. Post back here if you need further clarification.

cancel
Showing results for 
Search instead for 
Did you mean: