2 messages in com.canoo.lists.webtestRe: [Webtest] GET METHOD
FromSent OnAttachments
Uira Kulesza08 May 2002 06:23 
Stein Erik Berget08 May 2002 06:35 
Subject:Re: [Webtest] GET METHOD
From:Stein Erik Berget (sebe@escenic.com)
Date:05/08/2002 06:35:14 AM
List:com.canoo.lists.webtest

Uira Kulesza wrote:

Hi Canoo Web Test Team,

I started to use Canoo to do some acceptance tests in our web applications.

The majority of our web applications use javascript to validate some fields in HTML Forms, so I can't use tags <setinputfield> and <clickbutton> to submit some requests to Java Servlets that we build. In this case, we've tried to use tag <invoke>, doing HTTP Get Method submissions to our Java Servlets, like:

<invoke stepid="Acess to Register Cliente Servlet"

url="servletRegisterClient?name=blablabla&amp;address=blllakjkajdfklja" save="registerCliente" />

Doing my work like this way, I could have "big" HTTP Get Method submissions to my servlets. My doubt is: do you know if there's any restriction to the length of HTTP Get Method, in protocol, browser or server???

Sure there is! This is browser dependent. I don't know if httpUnit has some restrictions here. The server side also has some restrictions. Large inputs should always be submitted as post. This is currently impossible in the webTest version that excist's today. I would have liked to be able to do something like this:

<steps> <setpostfield name="title" value="${title}" /> <setpostfield name="ingress" value="${ingress}" /> <setpostfield name=linktext" value="${linktext}" />

<invoke stepid="Get index file" url="/template/test.jsp" method="post" /> <verifyxpath stepid="Linked title" select="/html/body/h1/a" value="${title}" /> <verifyxpath stepid="Check for ingress" select="/html/body/p" value="${ingress}" /> <verifyxpath stepid="Linked linktext" select="/html/body/p/a" value="${linktext}" /> </steps>