How do I pass a cookie to the next Test Step in a JSON call?
Hello,
I am trying to create tests in SoapUI 5.2.1. Previously, another employee was able to create some working tests, however I am having trouble with the product.
The working test logs the user into the web application, then adds an item to the database through api calls/JSON. I tried to create a similar test where an item is deleted, however it seems the trouble is that the login step doesn't pass the authenticated-user cookie to the delete item step. This causes the delete step to get stuck at the login page, as it doesn't remember getting logged in. I can see the cookie in the "Raw" data on the working test, but it is not present on the non-functional one.
I have already searched the forums for solutions to similar problems, however those solutions don't seem to precisely solve this issue. If anyone has some insight as to how to solve my issue, it would be appreciated.
Regards,
Jesse
Hi,
I take it you've tried enabling the TestCase level property "Maintain HTTP Session":
When I have worked with TestStep interactions involving related HTTP Request TestSteps that login and then do stuff as part of the same session, this did the trick in preserving the auth details.
Possibly your TestCase is different / more complex?
Regards,
Rupert