HTTP 302

dkahlichdkahlich Posts: 5
edited August 5, 2006 1:35PM in ANTS Load
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


  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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.
  • 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)"

    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/ ... 500x35.gif 0 16 17 7658 13
    4 GET http://rdcsqltest01/macsinsight/images/ ... e77x30.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?
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    "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.
  • 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.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    How long does this test run? Can you run it a bit longer and see if that makes the error dissappear?
  • 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?
  • Brian DonahueBrian Donahue Posts: 6,590 New member

    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.
Sign In or Register to comment.