[Webtest] RE: Verifying URL components

Dierk Koenig webtest@lists.canoo.com
Thu, 12 Sep 2002 18:03:36 +0200


Hi Jerry,

it seems you are adressing some fairly technical issues with
WebTest. Maybe the easiest solution for you is to use
HttpUnit directly. Afterwards, there is still the option of wrapping your
code in a WebTest step and putting it in the codebase as
a contribution.

Another approach would be to change your webapp a little.
E.g. you could write meta-information like the effective
url in an html comment on your page.
(This maybe helpful anyways for debugging.)
WebTest could then check for this comment.

cheers
Mittie


> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Jerry Gaines
> Sent: Donnerstag, 12. September 2002 14:35
> To: webtest@lists.canoo.com
> Subject: [Webtest] RE: Verifying URL components
..
> Another, related scenario.  In a Servlet 2.3 web application, you
> can define
> a welcome file which will be served to the user when they request a
> directory (using the <welcome-file-list> element of the deployment
> descriptor).   But, at least with the Tomcat 4.0.x appserver, this welcome
> file gets served up via a redirect, so that the user enters
> http://www.foobar.com, and then the address field changes to
> http://www.foobar.com/index.html.
>
> A customer of ours, however, has a requirement that the URL not change.
> This is easy enough to do, but I want to test it.  How do we
> verify that no
> redirect took place?  Is it possible to examine arbitrary headers in the
> HTTP response, for instance?  From JavaScript it's easy to get information
> about the URL (window.location.href), but of course WebTest does not do
> JavaScript.
..
> Jerry
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>