| Author |
Message |
tonymaynardsmith
Joined: 02 Dec 2006 Posts: 4
|
Posted: Sat Dec 02, 2006 4:34 pm Post subject: Redirection query |
|
|
I noticed in a previous post the statement that ANTS Load does not follow Redirections, by design.
1. Can you explain the thinking behind this, since it would seem better to me if it did do so.
2. In my experience it sometimes seems to record redirections in the script, and sometimes not. Can you explain when it does and when not?
With thanks,
Tony Maynard-Smith. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Mon Dec 04, 2006 12:57 am Post subject: |
|
|
Hi,
That's a good question. You have two parts to ANTS Load: the script recorder and the script runner. The script recorder will pick up any requests during the recording session through a built-in proxy. Theoretically this means it will pick up the request made by the browser as the result of an HTTP 301 or 302 request.
The script player does not support redirects, which confuses users who assume ANTS Load will behave like IE or .NET's HTTPRequest and automatically follow the redirect. But that behavior would be redundant as the URL should already appear in the script.
There are reasons why this approach falls apart. One is that if the redirection URL is dynamically generated on the server, the GET request that simulates the redirect could have the wrong URL or QueryString in it. For example, if the redirect location has a querystring in it containing a GUID or a sessionID, the redirection request in the test script could contain QueryString variables for a previous session. Also, if stateinformation is used in the POST method so that the information being sent to the server is different for each virtual client, the redirection URL recorded in the test script could also be invalid. In these cases you need to handle the redirections programatically in the script.
I am aware that on certain occasions, the GET request generated as the result of a redirect isn't picked up. I don't have a clear answer on this. I suppose the bottom line is that the request to follow 'redirect' was not correctly handled by the web browser. All requests sent by the web browser client should be trapped by the ANTS Load script recorder's proxy. Maybe your 'redirect' isn't a redirect at all (HTTP 301, 302), but a direct write to the client using the response stream on the server.
Hopefully this clears things up a bit. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group