karthe
12 years agoOccasional Contributor
[R] How to change the next request based on the response
Hi all,
I need to write the request based on the response. Assume two request as two steps in a test case, response of the teststep 1 gets generated as below. Request2 should contain status as "PENDING" if Response contains the status as P. Again, Request2 should contain status as "ACTIVE" if response contains the status as A. Could you please help me how to write the request automatically based on the value of the previous response.
Response 1:
<s0:idCreationResponse xmlns:s0="urn:xxxxxxxx.xxxxx.xxxxx">
<status>P</status>
<ID>23000234 CREATION SUCCESS</ID>
</idCreationResponse>
Request 2:
<search>
<status>Pending</status
<date>xxxx-xx-xx</date>
</search>
I need to write the request based on the response. Assume two request as two steps in a test case, response of the teststep 1 gets generated as below. Request2 should contain status as "PENDING" if Response contains the status as P. Again, Request2 should contain status as "ACTIVE" if response contains the status as A. Could you please help me how to write the request automatically based on the value of the previous response.
Response 1:
<s0:idCreationResponse xmlns:s0="urn:xxxxxxxx.xxxxx.xxxxx">
<status>P</status>
<ID>23000234 CREATION SUCCESS</ID>
</idCreationResponse>
Request 2:
<search>
<status>Pending</status
<date>xxxx-xx-xx</date>
</search>