"Object moved to here" error on running recorded test...

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited August 4, 2004 10:39AM in ANTS Load
Hi Greg,

Not knowing how the web application works, it's hard to say. Presumably,
ErrorPage.aspx may have potentially provide some information as to what's
going wrong.

So I'd suggest this: Add a line to your script to get the error page and
log the content.

It should work like this:

WebClient.Get(login.aspx)
If HttpResponse.Status.Code=302 Then
WebClient.Get(HttpResponse.Headers("Location"))
Me.LogToFile(HttpResponse.Content)

That code will get the login page, and if it redirects you somewhere,
iit will go get the redirected page. Then you log the content of that page
to your log file.

ANTS Load doesn't handle 302 redirects like a browser really would; you
need to put conditions in your script to handle them if necessary.

Please let us know if you have any more questions.

Regards,

Brian Donahue
Red Gate Technical Support

"Greg Allen" <gallen@arrayinc.com> wrote in message
news:uBbQ4wadEHA.1508@server53...
> I have downloaded ANTS and am testing a web application. My simple
> test case is to simply log onto the system, do one thing, and then log
off.
>
> The test recorded fine, and the script looks OK. But when running the
> test things didn't look quite right (no database changes that I expected
to
> see from running the test occurred).
>
> After some investigation, I decided to look at the output from the POST.
> What I got back was this (via LogToFile(WebClient.HttpResponse.Content)):
>
> VirtualClient 4 7/29/2004 4:21:21 PM
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a href='/ErrorPage.aspx'>here</a>.</h2>
> </body></html>
>
> That is not what should be coming back.
>
> Any ideas? Is there some other debugging I could turn on to help
> me out?
>
> Thanks,
>
> -- Greg Allen
> gallen@arrayinc.com
>
>

Comments

This discussion has been closed.