[Webtest] [testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception in step InvokePage at with (stepId="get local file"
CF Wong
webtest@lists.canoo.com
Sat, 8 May 2004 14:07:23 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0003_01C43505.C8EAB4B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi Lezoul, as you suggested the problem might be caused by too many changes
to the installTest.xml file and environment variables. I did re-install
webtest (build 441)
and ant (1.5.4). However, I still ran into the same problem even the
installTest.xml file has been changed as you suggested.
I am enclosing displays of system variables, changed of xml file and error
message below. I really appreciate your help in resloving this initial
problem.
Thank you in advance.
Best Regards,
CF
-------- display of system variables ---------------
D:\>set ant_home
ANT_HOME=D:\ant-1.5.4
D:\>set classpath
CLASSPATH=D:\WebTest\lib;D:\ant-1.5.4\lib;
D:\>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Sun\AppServe
r\jd
k\bin;D:\ant-1.5.4\bin
--------- changed installTest.xml ----------------
<target name="checkWebTest">
<echo message="base dir is ${base.dir}"/>
<testSpec name="check calling and parsing a local file">
<config
host=""
port="0"
basepath="/"
summary="false"
verbose="true"
saveresponse="true"
haltonfailure="true"
protocol="file" />
<steps>
<invoke
stepid="get local file"
url="${base.dir}/testfile.html" />
<verifytitle
stepid="check the title is parsed correctly"
text="Test File Title" />
</steps>
</testSpec>
</target>
------------ webtest error message ------------
D:\WebTest\doc\samples>ant -buildfile installTest.xml
Buildfile: installTest.xml
checkANT:
mayPrintANTError:
checkWebTest:
[echo] base dir is D:\WebTest\doc\samples
[testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception in
step I
nvokePage at with (stepId="get local file",
url="D:\WebTest\doc\samples/testfil
e.html", stepType="invoke")
[testSpec] java.net.UnknownHostException: D
[testSpec] at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
[testSpec] at java.net.Socket.connect(Socket.java:452)
[testSpec] at java.net.Socket.connect(Socket.java:402)
[testSpec] at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
[testSpec] at sun.net.NetworkClient.openServer(NetworkClient.java:118)
[testSpec] at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
[testSpec] at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
[testSpec] at
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConne
ction.java:175)
[testSpec] at
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpU
RLConnection.java:257)
[testSpec] at
com.meterware.httpunit.HttpWebResponse.getInputStream(HttpWeb
Response.java:68)
[testSpec] at
com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse
.java:61)
[testSpec] at
com.meterware.httpunit.WebConversation.newResponse(WebConvers
ation.java:61)
[testSpec] at
com.meterware.httpunit.WebWindow.getResource(WebWindow.java:1
62)
[testSpec] at
com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindo
w.java:125)
[testSpec] at
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:1
18)
[testSpec] at
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:9
9)
[testSpec] at
com.meterware.httpunit.WebClient.getResponse(WebClient.java:8
6)
[testSpec] at
com.canoo.webtest.steps.request.Target.getResponse(Target.jav
a:179)
[testSpec] at
com.canoo.webtest.steps.request.Target$2.call(Target.java:156
)
[testSpec] at
com.canoo.webtest.steps.request.Target.protectedGoto(Target.j
ava:106)
[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:193)
[testSpec] at org.apache.tools.ant.Task.perform(Task.java:341)
[testSpec] at org.apache.tools.ant.Target.execute(Target.java:309)
[testSpec] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[testSpec] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[testSpec] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[testSpec] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[testSpec] at org.apache.tools.ant.Main.start(Main.java:196)
[testSpec] at org.apache.tools.ant.Main.main(Main.java:235)
BUILD FAILED
file:D:/WebTest/doc/samples/installTest.xml:10: Test failed.
Exception raised: com.canoo.webtest.engine.StepExecutionException:
Unexpected ex
ception caught: java.net.UnknownHostException: D, Step: InvokePage at with
(ste
pId="get local file", url="D:\WebTest\doc\samples/testfile.html",
stepType="invo
ke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception
caught
: java.net.UnknownHostException: D, Step: InvokePage at with (stepId="get
local
file", url="D:\WebTest\doc\samples/testfile.html", stepType="invoke")
at
com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:334)
at
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:115)
at
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)
at
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:
37)
at com.canoo.webtest.steps.Step.execute(Step.java:99)
at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
at
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecification
Task.java:68)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Total time: 20 seconds
D:\WebTest\doc\samples>
------=_NextPart_000_0003_01C43505.C8EAB4B0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial><SPAN class=3D093184217-08052004><PRE><FONT =
face=3DArial size=3D2>Hi Lezoul, as you suggested the problem might be =
caused by too many changes to the installTest.xml file and environment =
variables. I did re-install webtest (build 441) </FONT></PRE><PRE><FONT =
face=3DArial size=3D2>and ant (1.5.4). However, I still ran into the =
same problem even the installTest.xml file has been changed as you =
suggested.</FONT></PRE><PRE></SPAN></FONT><SPAN =
class=3D093184217-08052004><FONT face=3DArial size=3D2>I am enclosing =
displays of system variables, changed of xml file and error message =
below. I really appreciate your help in resloving this initial problem. =
</FONT></SPAN></PRE><PRE><SPAN class=3D093184217-08052004><FONT =
face=3DArial size=3D2>Thank you in advance.</FONT></SPAN></PRE></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>Best Regards,</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>CF</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2>-------- display of=20
system variables ---------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2>D:\>set=20
ant_home<BR>ANT_HOME=3DD:\ant-1.5.4</FONT></SPAN></DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2>D:\>set=20
classpath<BR>CLASSPATH=3DD:\WebTest\lib;D:\ant-1.5.4\lib;</FONT></SPAN></=
DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2>D:\>path<BR>PATH=3DC:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\=
System32\Wbem;D:\Sun\AppServer\jd<BR>k\bin;D:\ant-1.5.4\bin</FONT></SPAN>=
</DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2>--------- changed=20
installTest.xml ----------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2><target=20
name=3D"checkWebTest"><BR> =
<echo=20
message=3D"base dir is ${base.dir}"/><BR> <testSpec =
name=3D"check=20
calling and parsing a local=20
file"><BR> <config<BR> &nbs=
p; =20
host=3D""<BR> port=3D"0"<BR> &nbs=
p;basepath=3D"/"<BR> summary=3D"false"<BR> &n=
bsp; verbose=3D"true"<BR> saveresponse=3D=
"true"<BR> haltonfailure=3D"true"<BR> &=
nbsp; protocol=3D"file"=20
/><BR> <steps><BR> <i=
nvoke<BR> stepid=3D"get=20
local =
file"<BR> url=3D"${base.dir}/testfile.html" =
/><BR> <verifytitle<BR> &nb=
sp; stepid=3D"check=20
the title is parsed =
correctly"<BR> text=3D"Test File=20
Title"=20
/><BR> </steps><BR> </testSpec>=
;<BR> </target></FONT></SPAN></DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2>------------ webtest=20
error message ------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2>D:\WebTest\doc\samples>ant -buildfile =
installTest.xml<BR>Buildfile:=20
installTest.xml</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2>checkANT:</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2>mayPrintANTError:</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2>checkWebTest:<BR> [echo] base dir is=20
D:\WebTest\doc\samples<BR> [testSpec] ERROR (Step.java:333) - =
Cannot handle=20
unexpected exception in step I<BR>nvokePage at with (stepId=3D"get =
local=20
file", url=3D"D:\WebTest\doc\samples/testfil<BR>e.html",=20
stepType=3D"invoke")<BR> [testSpec] java.net.UnknownHostException:=20
D<BR> [testSpec] at=20
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)<BR> [test=
Spec] =20
at=20
java.net.Socket.connect(Socket.java:452)<BR> [testSpec] &=
nbsp; =20
at=20
java.net.Socket.connect(Socket.java:402)<BR> [testSpec] &=
nbsp; =20
at=20
sun.net.NetworkClient.doConnect(NetworkClient.java:139)<BR> [testSpe=
c] =20
at=20
sun.net.NetworkClient.openServer(NetworkClient.java:118)<BR> [testSp=
ec] =20
at=20
sun.net.ftp.FtpClient.openServer(FtpClient.java:423)<BR> [testSpec]&=
nbsp; =20
at=20
sun.net.ftp.FtpClient.<init>(FtpClient.java:692)<BR> [testSpec=
] =20
at=20
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConne<BR>ction.ja=
va:175)<BR> [testSpec] =20
at=20
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpU<BR>RLConnec=
tion.java:257)<BR> [testSpec] =20
at=20
com.meterware.httpunit.HttpWebResponse.getInputStream(HttpWeb<BR>Response=
.java:68)<BR> [testSpec] =20
at=20
com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse<BR>.j=
ava:61)<BR> [testSpec] =20
at=20
com.meterware.httpunit.WebConversation.newResponse(WebConvers<BR>ation.ja=
va:61)<BR> [testSpec] =20
at=20
com.meterware.httpunit.WebWindow.getResource(WebWindow.java:1<BR>62)<BR>&=
nbsp;[testSpec] =20
at=20
com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindo<BR>w.java:1=
25)<BR> [testSpec] =20
at=20
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:1<BR>18)<BR>&=
nbsp;[testSpec] =20
at=20
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:9<BR>9)<BR>&n=
bsp;[testSpec] =20
at=20
com.meterware.httpunit.WebClient.getResponse(WebClient.java:8<BR>6)<BR>&n=
bsp;[testSpec] =20
at=20
com.canoo.webtest.steps.request.Target.getResponse(Target.jav<BR>a:179)<B=
R> [testSpec] =20
at=20
com.canoo.webtest.steps.request.Target$2.call(Target.java:156<BR>)<BR>&nb=
sp;[testSpec] =20
at=20
com.canoo.webtest.steps.request.Target.protectedGoto(Target.j<BR>ava:106)=
<BR> [testSpec] =20
at=20
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java<BR>:153)<BR=
> [testSpec] =20
at=20
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePa<BR>ge.java:=
37)<BR> [testSpec] =20
at=20
com.canoo.webtest.steps.Step.execute(Step.java:99)<BR> [testSpec]&nb=
sp; =20
at=20
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)<BR> [te=
stSpec] =20
at=20
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpeci<BR>fication=
Task.java:68)<BR> [testSpec] =20
at=20
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja<BR>va:193)<=
BR> [testSpec] =20
at=20
org.apache.tools.ant.Task.perform(Task.java:341)<BR> [testSpec] =
; =20
at=20
org.apache.tools.ant.Target.execute(Target.java:309)<BR> [testSpec]&=
nbsp; =20
at=20
org.apache.tools.ant.Target.performTasks(Target.java:336)<BR> [testS=
pec] =20
at=20
org.apache.tools.ant.Project.executeTarget(Project.java:1339)</FONT></SPA=
N></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2> [testSpec] at=20
org.apache.tools.ant.Project.executeTargets(Project.java:1255<BR>)<BR>&nb=
sp;[testSpec] =20
at=20
org.apache.tools.ant.Main.runBuild(Main.java:609)<BR> [testSpec]&nbs=
p; =20
at=20
org.apache.tools.ant.Main.start(Main.java:196)<BR> [testSpec] &=
nbsp; =20
at org.apache.tools.ant.Main.main(Main.java:235)</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial size=3D2>BUILD=20
FAILED<BR>file:D:/WebTest/doc/samples/installTest.xml:10: Test=20
failed.<BR>Exception raised: =
com.canoo.webtest.engine.StepExecutionException:=20
Unexpected ex<BR>ception caught: java.net.UnknownHostException: D, Step: =
InvokePage at with (ste<BR>pId=3D"get local file",=20
url=3D"D:\WebTest\doc\samples/testfile.html",=20
stepType=3D"invo<BR>ke")com.canoo.webtest.engine.StepExecutionException: =
Unexpected exception caught<BR>: java.net.UnknownHostException: D, Step: =
InvokePage at with (stepId=3D"get local<BR> file",=20
url=3D"D:\WebTest\doc\samples/testfile.html",=20
stepType=3D"invoke")<BR> at=20
com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:334)</FO=
NT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2> at=20
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:115)</FO=
NT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2> at=20
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)<BR>&nb=
sp; =20
at=20
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:<BR>=
37)<BR> =20
at=20
com.canoo.webtest.steps.Step.execute(Step.java:99)<BR> &=
nbsp; =20
at=20
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)<BR> &nb=
sp; =20
at=20
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecification<BR>=
Task.java:68)<BR> =20
at=20
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)<BR>&=
nbsp; =20
at=20
org.apache.tools.ant.Task.perform(Task.java:341)<BR> &nb=
sp; =20
at=20
org.apache.tools.ant.Target.execute(Target.java:309)<BR>  =
; =20
at=20
org.apache.tools.ant.Target.performTasks(Target.java:336)<BR> =
=20
at=20
org.apache.tools.ant.Project.executeTarget(Project.java:1339)<BR> &n=
bsp; =20
at=20
org.apache.tools.ant.Project.executeTargets(Project.java:1255)<BR> &=
nbsp; =20
at=20
org.apache.tools.ant.Main.runBuild(Main.java:609)<BR> &n=
bsp; =20
at=20
org.apache.tools.ant.Main.start(Main.java:196)<BR>  =
; =20
at org.apache.tools.ant.Main.main(Main.java:235)</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial =
size=3D2><BR>Total time: 20=20
seconds<BR>D:\WebTest\doc\samples><BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D093184217-08052004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV></BODY></HTML>
------=_NextPart_000_0003_01C43505.C8EAB4B0--