[Webtest] Install test issue

Neil Mix webtest@lists.canoo.com
Thu, 15 Apr 2004 07:45:26 -0700


Hi Dwayne,

I just installed for the first time yesterday, and I ran into this =
problem as well.  After some attempts at debugging, I eventually =
stumbled across a way to make it work.  In the <config> element of =
installTest.xml, change saveresponse=3D"false" to read =
saveresponse=3D"true".

I had meant to write the list about this.  My guess would be that =
there's a bug in the current build that always causes =
saveresponse=3D"false" to fail when there are multiple steps?  But since =
I'm brand new to using this product I wanted to see if some veterans on =
the list could shed some light on this.

Hope this helps.
  -Neil

> -----Original Message-----
> From: P. Dwayne Miller [mailto:dmiller@espgroup.net]
> Sent: Thursday, April 15, 2004 8:29 AM
> To: webtest@lists.canoo.com
> Subject: [Webtest] Install test issue
>=20
>=20
> All,
>=20
> I have gone through the mailling list archives and see=20
> several postings=20
> related to the problem I'm having, but I can not determine what the=20
> solution is.  Can you please help me.
>=20
> I have the latest version of web test from the web site, Ant=20
> v1.6.1, JDK=20
> 1.4.2_04
>=20
> I've made no configuration changes to any of the above=20
> products except=20
> to the INSTALLTEST.XML and the logfile configuration file to=20
> enable some=20
> additional debugging.
>=20
> I've tried both the FILE and HTTP protocols, with results below.  In=20
> both cases... it appears that the file is being retrieved=20
> successfully,=20
> but something is going wrong after that.
>=20
> USING FILE:
>=20
> checkWebTest:
>      [echo] base dir is D:\canoo\doc\samples
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D CONTENT-TYPE
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D text/html
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D =
CONTENT-LENGTH
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D -1
>  [testSpec] DEBUG (HttpWebResponse.java:55) - HttpWebResponse=20
> [url=3Dfile://D:/can
> oo/doc/samples/testfile.html; headers=3D
>  [testSpec]    CONTENT-TYPE: text/html
>  [testSpec]    CONTENT-LENGTH: -1 ]
>  [testSpec] DEBUG (HttpWebResponse.java:56) - _responseCode =3D 200
>  [testSpec] DEBUG (HttpWebResponse.java:57) - _responseMessage =3D OK
>  [testSpec] ERROR (Step.java:333) - Cannot handle unexpected=20
> exception=20
> in step I
> nvokePage at D:\canoo\doc\samples\installTest.xml:24:  with=20
> (stepId=3D"get=20
> local f
> ile", url=3D"D:\canoo\doc\samples/testfile.html", stepType=3D"invoke")
>  [testSpec] java.net.UnknownHostException: D
>  [testSpec]     at java.net.PlainSocketImpl.connect(Unknown Source)
>  [testSpec]     at java.net.Socket.connect(Unknown Source)
>  [testSpec]     at java.net.Socket.connect(Unknown Source)
>  [testSpec]     at sun.net.NetworkClient.doConnect(Unknown Source)
>  [testSpec]     at sun.net.NetworkClient.openServer(Unknown Source)
>  [testSpec]     at sun.net.ftp.FtpClient.openServer(Unknown Source)
>  [testSpec]     at sun.net.ftp.FtpClient.<init>(Unknown Source)
>  [testSpec]     at=20
> sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Sou
> rce)
>  [testSpec]     at=20
> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unkn
> own Source)
>  [testSpec]     at=20
> com.meterware.httpunit.HttpWebResponse.getInputStream(HttpWeb
> Response.java:68)
>=20
>=20
>=20
> USING HTTP:
>=20
> checkWebTest:
>      [echo] base dir is D:\canoo\doc\samples
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D DATE
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D Thu,=20
> 15 Apr 2004=20
> 13:10:45
>  GMT
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D SERVER
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D=20
> Apache/2.0.43 (Win32)
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D LAST-MODIFIED
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D Fri,=20
> 01 Mar 2002=20
> 19:47:16
>  GMT
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D ETAG
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D=20
> "2d1-51-e7d93900"
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D ACCEPT-RANGES
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D bytes
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D =
CONTENT-LENGTH
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D 81
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D KEEP-ALIVE
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D=20
> timeout=3D15, max=3D100
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D CONNECTION
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D Keep-Alive
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D CONTENT-TYPE
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D text/html;=20
> charset=3DISO-88
> 59-1
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D CONTENT-TYPE
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D text/html;=20
> charset=3DISO-88
> 59-1
>  [testSpec] DEBUG (HttpWebResponse.java:244) -=20
> HttpWebResponse.addHeader
>  [testSpec] DEBUG (HttpWebResponse.java:245) - key   =3D =
CONTENT-LENGTH
>  [testSpec] DEBUG (HttpWebResponse.java:246) - field =3D 81
>  [testSpec] DEBUG (HttpWebResponse.java:55) - HttpWebResponse=20
> [url=3Dhttp://10.2.1
> 0.2/testfile.html; headers=3D
>  [testSpec]    DATE: Thu, 15 Apr 2004 13:10:45 GMT
>  [testSpec]    SERVER: Apache/2.0.43 (Win32)
>  [testSpec]    CONNECTION: Keep-Alive
>  [testSpec]    CONTENT-TYPE: text/html; charset=3DISO-8859-1
>  [testSpec]    CONTENT-TYPE: text/html; charset=3DISO-8859-1
>  [testSpec]    ETAG: "2d1-51-e7d93900"
>  [testSpec]    LAST-MODIFIED: Fri, 01 Mar 2002 19:47:16 GMT
>  [testSpec]    CONTENT-LENGTH: 81
>  [testSpec]    CONTENT-LENGTH: 81
>  [testSpec]    ACCEPT-RANGES: bytes
>  [testSpec]    KEEP-ALIVE: timeout=3D15, max=3D100 ]
>  [testSpec] DEBUG (HttpWebResponse.java:56) - _responseCode =3D 200
>  [testSpec] DEBUG (HttpWebResponse.java:57) - _responseMessage =3D OK
>  [testSpec] DEBUG (Target.java:180) - Target.getResponse
>  [testSpec] DEBUG (Target.java:181) - response.getURL() =3D=20
> http://10.2.10.2/testf
> ile.html
>  [testSpec] DEBUG (Target.java:182) - response.isHTML() =3D true
>  [testSpec] DEBUG (Target.java:183) - response.getText() =3D <html>
>  [testSpec] <head>
>  [testSpec] <title>Test File Title</title>
>  [testSpec] </head>
>  [testSpec] <body>
>  [testSpec] empty
>  [testSpec] </body>
>  [testSpec] </html>
>  [testSpec] ERROR (Step.java:333) - Cannot handle unexpected=20
> exception=20
> in step I
> nvokePage at D:\canoo\doc\samples\installTest.xml:24:  with=20
> (stepId=3D"get=20
> local f
> ile", url=3D"testfile.html", stepType=3D"invoke")
>  [testSpec] java.lang.NullPointerException
>  [testSpec]     at=20
> com.canoo.webtest.engine.Context.setLastResponseForStep(Conte
> xt.java:119)
>  [testSpec]     at=20
> com.canoo.webtest.steps.request.Target.protectedGoto(Target.j
> ava:119)
>  [testSpec]     at=20
> com.canoo.webtest.steps.request.Target.gotoTarget(Target.java
> :153)
>  [testSpec]     at=20
> com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePa
> ge.java:37)
>  [testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:99)
>  [testSpec]     at=20
> com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
>  [testSpec]     at=20
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpeci
> ficationTask.java:68)
>  [testSpec]     at=20
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
> va:269)
>  [testSpec]     at org.apache.tools.ant.Task.perform(Task.java:364)
>=20
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20