cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer property from Run_test_step_1 to Run_test_step_2

SOLVED
Highlighted
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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super Contributor

Re: Transfer property from Run_test_step_1 to Run_test_step_2

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.

View solution in original post

3 REPLIES 3
Moderator

Re: Transfer property from Run_test_step_1 to Run_test_step_2

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



 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Highlighted
Occasional Contributor

Re: Transfer property from Run_test_step_1 to Run_test_step_2

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.

Highlighted
Super Contributor

Re: Transfer property from Run_test_step_1 to Run_test_step_2

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.

View solution in original post