Red Gate forums :: View topic - HTTP 302
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Load
ANTS Load forum

HTTP 302

Search in ANTS Load forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
dkahlich



Joined: 02 Aug 2006
Posts: 4

PostPosted: Wed Aug 02, 2006 6:06 pm    Post subject: HTTP 302 Reply with quote

I am using the 14 day trial version of ANTS Load.

Some of the pages that I'm trying to load test are returning an HTTP 302 message.

It seems that the ANTS views this return code as a failed test, when in fact it is a normal result of using a redirect.

Is there any way to have ANTS ignore the 302 message?

Even when I completely turn off the time to first and last byte indicators, all of my tests result in the "Failed" designation.

I'd like to be able to run a batch, going from 1 to 5 users so that I can have something to show my boss. Maybe he'll then sign off on buying the ANTS product.

Thanks for your help
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Wed Aug 02, 2006 6:19 pm    Post subject: Reply with quote

Hello,
I'm not sure how 302s affect the test results, but I can tell you that the ANTS WebClient doesn't automatically follow redirects and that tests fail because they don't meet the thresshold criteria in the edit load dialogue, on the options tab.

Normally you wouldn't need to follow the redirects; the ANTS Load script would pick up the navigation done as the result of the client following the redirection and put it in the test script. In some rare circumstances, this doesn't happen, say if the client is instructed to follow a URL that is generated dynamically, the test script may go to the wrong URL and you'd need to script the WebClient.Get to use the URL indicated in the location header returned in the 302 response.

Hopefully this information helps.
Back to top
View user's profile Send private message
dkahlich



Joined: 02 Aug 2006
Posts: 4

PostPosted: Wed Aug 02, 2006 8:36 pm    Post subject: Reply with quote

I've attempted to reduce my test to the simplest possible to see if I can get this to work.

I recorded a script that simply brings up the start page of my web app. This page ( ASP.NET 2.0 ) querys an MS Analysis Services Database and presents the result in a gridview.

When I run the test ( simulate 5 users for 1 minute ), I still get the message "The test system could not generate the required load or match the required profile". I guess I just don't know what this means.

Here's the script being run:

RandomSleep(1000, 2000)

WebClient.HttpRequest.ProtocolVersion = "HTTP/1.1"
WebClient.HttpRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
WebClient.GET("http://rdcsqltest01/macsinsight/")
WebClient.GET("http://rdcsqltest01/macsinsight/utility.js")
WebClient.GET("http://rdcsqltest01/macsinsight/images/hdr_insight500x35.gif")
WebClient.GET("http://rdcsqltest01/macsinsight/images/mplogo_imacsblue77x30.gif")


Here's the summary by object:

# Name Time to connect Time to first byte Time to last byte Bytes received Count
1 GET http://rdcsqltest01/macsinsight/ 4 558 564 8274 13
2 GET http://rdcsqltest01/macsinsight/utility.js 0 20 20 941 13
3 GET http://rdcsqltest01/macsinsight/images/hdr_insight500x35.gif 0 16 17 7658 13
4 GET http://rdcsqltest01/macsinsight/images/mplogo_imacsblue77x30.gif 0 15 15 868 13


Best I can tell, none of the first bytes takes more than 1 second, and none of the last bytes takes more than 10 seconds. So, why the failure?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Thu Aug 03, 2006 3:54 pm    Post subject: Reply with quote

"The test system could not generate the required load or match the required profile" normally means that the test never reached the goals that you'd set for it, either

  • ANTS Load never launched the required number of virtual clients (5)
  • The test script never completes

To figure out if it's case number 1, you can use perfmon, and examine the ANTS:Host:Virtual Clients counter

In the second case, check the results against the script and make sure all pages requested in the script appear in the summary information by object. Also test Summany Information by Metric->Test Errors and Http Status errors, if they're present. Maybe there is an indication there about why ANTS couldn't complete the specified test.
Back to top
View user's profile Send private message
dkahlich



Joined: 02 Aug 2006
Posts: 4

PostPosted: Thu Aug 03, 2006 4:33 pm    Post subject: Reply with quote

First off, thanks for your timely response!

I tried running the same test ( simply bringing up the first page of my app ), with only 1 virtual user simulated, and still get the same failure message.

Pages are being retrieved from the web server with no errors reported ( from the IIS log ).

There are no Test or HTTP errors on the ANTS Results page, and the one page ( along with a javascript and 2 gif files ) is present in the summary by object section.

I'm running ANTS on a machine with XP SP1 and .NET Framework 1.1 SP1.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Fri Aug 04, 2006 10:25 am    Post subject: Reply with quote

How long does this test run? Can you run it a bit longer and see if that makes the error dissappear?
Back to top
View user's profile Send private message
dkahlich



Joined: 02 Aug 2006
Posts: 4

PostPosted: Fri Aug 04, 2006 3:07 pm    Post subject: Reply with quote

That seems to do it!

I ran one test with 1 virtual user for 5 minutes and it completed successfully.

I then ran with 5 virtual users for 3 minutes and it completed successfully.

I had been just using the default of 1 minute.

Here's another question: Is there a way to simulate 5 virtual users, and have each of the five executing a seperate script?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Sat Aug 05, 2006 6:35 pm    Post subject: Reply with quote

Hello,

Sure! Use the record button repeatedly to record five different scripts. Then go into the edit load dialogue and set all five scripts to run on the composition tab. Set the ratio to 1 for each. If you set the test for five virtual users, then each virtual user should get assigned a different script to run.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. 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