cancel
Showing results for 
Search instead for 
Did you mean: 

Data not transfered

Contributor

Data not transfered

Hi,

 

I have the following REST API setup:

 

TestSuite
   TestCase
     DataSource step
     "TestStep A POST"
     "TestStep B POST"

 

XML-Response of executed "TestStep A POST" is:

<Response xmlns="http://xxxxxxxxxx">
   <authSession>
      <token>abcd</token>
   </authSession>
</Response>

The token is needed as value in HTTP header in TestStep B, so I've put there as Dynamic Property:

${TestStep A POST - /registration/client#ResponseAsXml#//Response[1]/authSession[1]/token[1]}

 

There's definitely something wrong in this setting, because when 2nd TestStep is executed, the value in the header is always empty. What error do I overlook??

3 REPLIES 3
Occasional Contributor

Re: Data not transfered

you might neeed to use a property transfer step (from testStep A to testStep B)

Re: Data not transfered

The test step name doesn't match, but maybe you just mistyped it when describing the setup?

 

Also, I believe you need the namespace declaration in the XPath expression. If you're using Ready! API you can get it generated easily by right-clicking in the editor and selecting Get data ...

 

Kind regards,

Manne, Ready! API Developer

Contributor

Re: Data not transfered

@NataliaB

Yes, came to this solution this morning after a good night of sleep Smiley Very Happy

Removed the "Dynamic Properties"-stuff and added a parameter with HEADER style. 

This one can be used in the PropertyTransfer.

New Here?
Join us and watch the welcome video:
Watch the New Interview
7Mistakes
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win