Forum Discussion

tclotworthy's avatar
tclotworthy
Contributor
9 years ago

Using A Transferred Parameter in a Test Step Request (REST)

Hi,

I appear to have successfully passed a parameter from Test Step1 to Test Step2 using the Property Transfer capability. However, I cannot figure out how to use the parameter in the request of Test Step2.

 

Here is how I set up the transfer:

Screen Shot 2016-01-06 at 4.06.50 PM.png

 

Below is the Test Step receiving the parameter "planId":

Screen Shot 2016-01-06 at 4.09.07 PM.png

I had assumed that since I passed the param from the CreatePID response to the UpdatePIDComment request (as per first screenshot), it would have appended the planId value to the UpdatePIDComment endpoint (i.e., http://localhost:8080/UpdatePIDComment?planId=whatever), but it is not working (when it doesn't work you see that "No PlanId passed to UpdatePIDComment. Doing nothing." as shown in the response window in UpdatePIDComment.

 

I can't figure out what to do, and I would be very grateful for any help. Thank you.

 

  • Looks good, can you try something similar to this now in the property transfer step: (Soap Request is your CreatePID step).

     

    PlanID - Transfer.PNG

  • tclotworthy's avatar
    tclotworthy
    9 years ago

    ok, your last reply got the Property Transfer step to appear to work properly when I run the step stand-alone (see valid output below):

    Screen Shot 2016-01-07 at 1.07.38 PM.png

    However, something still must be missing, because when I run the entire test case, the step that needs the planId as input (UPdatePIDComment) is generating an output essentially indicating a failure message (i.e., that the planId never was sent as the expected parameter in its request) (see below):

    Screen Shot 2016-01-07 at 1.10.25 PM.png

    So, seems to be something still not working in the transfer or something. Thanks for all your help!