Forum Discussion

vpachpute1's avatar
vpachpute1
Frequent Contributor
9 years ago

Take transaction id from response and pass in next request

Hi

 

Actually I am new to ReadyAPI. I have following scenario. Can anyone please help on this.

 

Purchase one package and cancel transaction using transaction ID.


1. Purchase request: I have to pass package id from parameterised file. because it will change

<?xml version="1.0" encoding="UTF-8"?>
<test">
      <purchase>
         <msisdn>447717777777</msisdn>
         <package-id>2PP_P001</package-id>
         <rating-attributes />
      </purchase>
   
</test>

Response
<transaction-id>566</transaction-id>

2. Take transaction ID from response and pass in Cancel transaction request

<test>
        <cancelTrans>
            <transaction-id>566</transaction-id>
        </cancelTrans>
        
</test>

Regards

Vishal

1 Reply

  • Radford's avatar
    Radford
    Super Contributor

    There are two simple out-of-the-box methods. You can either:

     

    1. Put a Property Transfer test step between your two test steps and configure appropriate to your needs.
    2. Use the Point and Click Get Data functionality from within your second test step to reference the first.