[Webtest] Using the file:// protocol?

Daniel Sheppard webtest@lists.canoo.com
Tue, 11 Feb 2003 13:38:17 +1100


How are you meant to run webtest to use the file:// protocol?

I've got this ant file:

<project name=3D"TestFile" basedir=3D"." default=3D"main">
=20      =20
=09&definition;
=09
=09<target name=3D"main">
=09	<testSpec name=3D"TestFile">
=20       <config
=20           protocol=3D"file://"
=20           basepath=3D"c:\"/>
=20  =20
=09		<steps>
=09		 <invoke url=3D"temp.html"/>
=09		</steps>

=09	</testSpec>
=09</target>
</project>

How am I meant to specify the hostname and port to work with this? Runnin=
g it gives this error:

Error encountered: TestFile(com.canoo.webtest.engine.ConfigurableTestCase=
): \\null:80\c:\tempa.html (The network path was not found)
Exception raised: java.io.FileNotFoundException: \\null:80\c:\tempa.html =
(The network path was not found)java.io.FileNotFoundException: \\null:80\=
c:\tempa.html
(The network path was not found)
=20       at java.io.FileInputStream.open(Native Method)
=20       at java.io.FileInputStream.<init>(Unknown Source)
=20       at java.io.FileInputStream.<init>(Unknown Source)
=20       at sun.net.www.protocol.file.FileURLConnection.connect(Unknown =
Source)
=20       at sun.net.www.protocol.file.FileURLConnection.getInputStream(U=
nknown Source)
=20       at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebRespons=
e.java:56)
=20       at com.meterware.httpunit.WebConversation.newResponse(WebConver=
sation.java:66)
=20       at com.meterware.httpunit.WebClient.getResponse(WebClient.java:=
70)
=20       at com.meterware.httpunit.WebClient.getResponse(WebClient.java:=
57)
=20       at com.canoo.webtest.steps.Target.getResponse(Target.java:227)
=20       at com.canoo.webtest.steps.Target.gotoTarget(Target.java:200)
=20       at com.canoo.webtest.steps.Target.gotoTarget(Target.java:164)
=20       at com.canoo.webtest.steps.InvokePage.doExecute(InvokePage.java=
:41)
=20       at com.canoo.webtest.steps.AbstractTestStepSpecification.execut=
e(AbstractTestStepSpecification.java:57)
=20       at com.canoo.webtest.engine.ConfigurableTestCase.runTest(Config=
urableTestCase.java:34)
=20       at junit.framework.TestCase.runBare(TestCase.java:140)
=20       at junit.framework.TestResult$1.protect(TestResult.java:106)
=20       at junit.framework.TestResult.runProtected(TestResult.java:124)=

=20       at junit.framework.TestResult.run(TestResult.java:109)
=20       at junit.framework.TestCase.run(TestCase.java:131)
=20       at junit.framework.TestCase.run(TestCase.java:124)
=20       at com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpec=
ificationTask.java:56)
(stack truncated)
#########################################################################=
############
This email has been scanned by MailMarshal, an email content filter.
#########################################################################=
############