Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS Web Performance Test - AJAX requests recorded in wrong order?

I'm new to using VSTS and I'm trying to create some web tests to form a load test for an ASP.NET WebForms app I've inherited.

The site heavily uses 'AJAX Pro', an AJAX framework that was about before Microsoft released their AJAX framework with UpdatePanels etc.

The problem I'm having is that the web test recorder seems to be appending the AJAX requests to the end of the test:

enter image description here

Because they are appended to the end of the test, after I've logged out, the requests don't have the .ASPXAUTH cookie token in the request, and ASP.NET responds with a 302 back to the login page (as I'd expect) and this causes the test to fail.

I can manually move these ajax request to the correct position in the sequence of requests so the tests pass - but this example is a very simple test and the application makes LOTS of AJAX requests and this wouldn't be viable to do in larger & more complex tests.

So, why is it doing this, and what can I do so that AJAX requests are made in the correct order?

like image 904
David Masters Avatar asked Mar 29 '12 08:03

David Masters


1 Answers

When the builtin webtest recorder fails you, it's time to fire up the irreplaceable, free Fiddler http proxy/recorder, do your recording with it, and then use the "Export to Visual Studio WebTest" feature to create a webtest from the recording. You can even use Fiddler while recording in Visual Studio so you can get both recordings simultaneously and you can compare to see what Visual Studio got wrong.

As an http proxy, Fiddler captures all http traffic and in the correct order. It will save your sanity, guaranteed.

like image 58
agentnega Avatar answered Nov 15 '22 04:11

agentnega