Answered question

why does neoload update the referer request header incorrectly for asychronous api calls?

I am working on a web app built out of angular js UI and MVC web api middle tier.

We call an index page which then uses javascript to make multiple asynchronous calls to get different pieces of data from the server.

I am having problems checking the virtual user following recording. On investigation it looks like Neoload is updating the referrer URL from the index page to the actual api being called. The problem with this is that it is also losing all the input parameters being passed across the URL e.g id etc.

It does this for any request which occurs after the index page.

e.g
index.html >> valid
get data 1 API call >> valid
get data 2 API call >> 500 error
get data 3 API call >> 500 error

This results in 500 internal server errors.

Why does Neoload do this? Anyway to stop it / is there anything in particular you have to do for asynchronous api requests.

As a workaround I have repeated the call to the index page before each api call in turn.

Stefan O.
Stefan O.

Stefan O.

Level
0
27 / 100
points
Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Do you know if those API call should be executed in a specific order?

By default, NeoLoad will replay them in parallel and so the order might not be the same all the time.

Why do you think the referer would be an issue? Do you know if your application uses it?

In case you can override the referer of the request under the Advanced settings of each of your requests.

Did you find this useful ?

No (0)

Yes (1)

100%

100% of users found this answer useful

Other answers

Stefan O.
Stefan O.

Stefan O.

Level
0
27 / 100
points

Thanks for the follow-up Nouredine I had just come across that in the help. That did fix it.

http://www.neotys.com/documents/doc/neoload/latest/en/htm...

The order the request are fired off isn't important but I think they get some parameters off the referrer URL like the id etc.

Why do you have to manually set the referrer URL in this case.
I'm asking as it is going to add quite an overhead to writing the test cases / if any re-write is ever necessary.