[Webtest] Install test issue

P. Dwayne Miller webtest@lists.canoo.com
Thu, 15 Apr 2004 09:29:06 -0400


All,

I have gone through the mailling list archives and see several postings 
related to the problem I'm having, but I can not determine what the 
solution is.  Can you please help me.

I have the latest version of web test from the web site, Ant v1.6.1, JDK 
1.4.2_04

I've made no configuration changes to any of the above products except 
to the INSTALLTEST.XML and the logfile configuration file to enable some 
additional debugging.

I've tried both the FILE and HTTP protocols, with results below.  In 
both cases... it appears that the file is being retrieved successfully, 
but something is going wrong after that.

USING FILE:

checkWebTest:
     [echo] base dir is D:\canoo\doc\samples
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONTENT-TYPE
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = text/html
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONTENT-LENGTH
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = -1
 [testSpec] DEBUG (HttpWebResponse.java:55) - HttpWebResponse 
[url=file://D:/can
oo/doc/samples/testfile.html; headers=
 [testSpec]    CONTENT-TYPE: text/html
 [testSpec]    CONTENT-LENGTH: -1 ]
 [testSpec] DEBUG (HttpWebResponse.java:56) - _responseCode = 200
 [testSpec] DEBUG (HttpWebResponse.java:57) - _responseMessage = OK
 [testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception 
in step I
nvokePage at D:\canoo\doc\samples\installTest.xml:24:  with (stepId="get 
local f
ile", url="D:\canoo\doc\samples/testfile.html", stepType="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 
sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Sou
rce)
 [testSpec]     at 
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unkn
own Source)
 [testSpec]     at 
com.meterware.httpunit.HttpWebResponse.getInputStream(HttpWeb
Response.java:68)



USING HTTP:

checkWebTest:
     [echo] base dir is D:\canoo\doc\samples
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = DATE
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = Thu, 15 Apr 2004 
13:10:45
 GMT
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = SERVER
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = Apache/2.0.43 (Win32)
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = LAST-MODIFIED
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = Fri, 01 Mar 2002 
19:47:16
 GMT
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = ETAG
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = "2d1-51-e7d93900"
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = ACCEPT-RANGES
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = bytes
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONTENT-LENGTH
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = 81
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = KEEP-ALIVE
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = timeout=15, max=100
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONNECTION
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = Keep-Alive
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONTENT-TYPE
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = text/html; 
charset=ISO-88
59-1
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONTENT-TYPE
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = text/html; 
charset=ISO-88
59-1
 [testSpec] DEBUG (HttpWebResponse.java:244) - HttpWebResponse.addHeader
 [testSpec] DEBUG (HttpWebResponse.java:245) - key   = CONTENT-LENGTH
 [testSpec] DEBUG (HttpWebResponse.java:246) - field = 81
 [testSpec] DEBUG (HttpWebResponse.java:55) - HttpWebResponse 
[url=http://10.2.1
0.2/testfile.html; headers=
 [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=ISO-8859-1
 [testSpec]    CONTENT-TYPE: text/html; charset=ISO-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=15, max=100 ]
 [testSpec] DEBUG (HttpWebResponse.java:56) - _responseCode = 200
 [testSpec] DEBUG (HttpWebResponse.java:57) - _responseMessage = OK
 [testSpec] DEBUG (Target.java:180) - Target.getResponse
 [testSpec] DEBUG (Target.java:181) - response.getURL() = 
http://10.2.10.2/testf
ile.html
 [testSpec] DEBUG (Target.java:182) - response.isHTML() = true
 [testSpec] DEBUG (Target.java:183) - response.getText() = <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 exception 
in step I
nvokePage at D:\canoo\doc\samples\installTest.xml:24:  with (stepId="get 
local f
ile", url="testfile.html", stepType="invoke")
 [testSpec] java.lang.NullPointerException
 [testSpec]     at 
com.canoo.webtest.engine.Context.setLastResponseForStep(Conte
xt.java:119)
 [testSpec]     at 
com.canoo.webtest.steps.request.Target.protectedGoto(Target.j
ava:119)
 [testSpec]     at 
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java
:153)
 [testSpec]     at 
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePa
ge.java:37)
 [testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:99)
 [testSpec]     at 
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
 [testSpec]     at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpeci
ficationTask.java:68)
 [testSpec]     at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:269)
 [testSpec]     at org.apache.tools.ant.Task.perform(Task.java:364)