2 messages in com.canoo.lists.webtestRe: [Webtest] GET METHOD| From | Sent On | Attachments |
|---|---|---|
| Uira Kulesza | 08 May 2002 06:23 | |
| Stein Erik Berget | 08 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&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>
I haven't tried to "fake" a post request by generating a fake form or something, but I guess that it is a workaround, but an ugly one... -- Stein Erik Berget Research & Development + 47 911 29 260 (Mobile) Escenic AS + 47 23 27 34 40 (switchboard) Sommerogt 13-15 + 47 23 27 34 01 (fax) Box 2393 Solli http://www.escenic.com/ N-0201 OSLO




