0 votes

I am trying to run a load test with multiple steps:

Step 1- Make a request to get a Token via web services

Step 2- Make an authenticated request with the Token to the Resource Service.

I need to store the token and then use it on the next subsequent call.

When testing this I tried:

Dim result

result = WebPostFromFile("[URL]","application/x-www-form-urlencoded","[filename]")

PrintLn (result)

but this just outputs System.Byte[]

asked Apr 26, 2016 in QA Wizard Pro by anonymous

1 Answer

0 votes
Are you expecting string (json) back with your token in..?
I was able to reproduce this on a REST API, so we will investigate why it is returning System.Byte[] in this instance.

We would expect a text value to be returned (string) with the values and token data inside.
The header information is no passed back into your result variable (this is correct).
answered Apr 27, 2016 by nico (8,200 points)

Yes, I am expecting JSON back. I would think it should respond back and put the values into an array, but even declaring as an array I was unable to get the value.
Reponse would look like this:

{"access_token":"Z5MPskOi1-3Oiv_bXXUovcad6aBorBzyBrvfvgH-Tq2MDf4SnUn_KSsYWr9ocIwLyBbqf0UWq6_NOk1GDSEYCBJ_HtUhIbszOzn3v50EjnYdzrgEKcGpWBC1A36OEYLwEOOEbguVS1u3mQlG8-ZgPu1zaZ7q_Q55vK_63KWMnVJQpZdKNELJh2r1qAQQR07i4L6VHvEXJE2czWyQLJnvPyAoaz5bogVs-5t2S82ZxduupB-2n24xeqoKDzWkdCZ_vwIYt1fWS4L1lkt3G0i2U9vYIHNNB7vlKibFKaYvJJ_papWXJFVSPgToos0OqSqQNFSgB6_bNKfIIZkn7i3U_mHcuxY2DFnKgeXjLxNmp5qvUzx_IT2xUibbadyuaAK0PVNNhKqLLrsIUUfq-x4aQp-zJQQhueYEBr7SgeKuvZ02VVzPHEGlpw9DkYQSLt1gn1nZXgJWq9SMShn4bNZdDDPOtGSbrgrbN8BKWGU4Xow","token_type":"bearer","expires_in":1209599,"userName":"myname",".issued":"Tue, 26 Apr 2016 19:11:13 GMT",".expires":"Tue, 10 May 2016 19:11:13 GMT"}


What is the Content-Type that your service responds with..?
The Content-Type requested in the header is "application/x-www-form-urlencoded", as this is an https service. The response header Content-Type is "application/json"
The issue (bug) has been found and it will be fixed in the next release. This will allow you to get the text response back (as it should work).

Please email me for a license evaluation extension to ensure you can complete your evaluation and test the updated release.
Any idea when this is going to be available?
The official release will be out in about 30 days from today.
But we can get you the updated build with the hotfix in.

You can email me directly and I can get you the details nico [@] seapine.com
248 questions
262 answers
2,047 users