[Webtest] How To Debug Tests
Bit Byter
webtest@lists.canoo.com
Mon, 4 Sep 2006 18:17:55 +0200 (CEST)
Hi WebTesters,
I'm new to Canoo WebTest and just trying to get it run with Maven 1.1b2. So=
I installed the Maven WebTest Plugin from http://maven-plugins.sourceforge=
.net/maven-webtest-plugin/downloads.html.
I'm trying to run an adapted version of the simple SampleTest.xml from the =
Canoo website:
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE project [
<!ENTITY taskdef SYSTEM "taskdef.=
xml">
]>
<project name=3D"SimpleTest" basedir=3D"." default=3D"main">
&taskdef;
<target name=3D"main">
<webtest name=3D"myTest">
<config host=3D"127.0.0.1" port=3D"9090" protocol=3D"http" basepat=
h=3D"/myapp" />
<steps>
<invoke description=3D"get Login Page" url=3D"login" method=3D"=
GET"/>
<verifyTitle description=3D"we should see the login title" text=
=3D"Login Page" />
</steps>
</webtest>
</target>
</project>
The included "taskdef" entity looks like this:
<taskdef file=3D"${webtest.home}/webtestTaskdefs.properties">
<classpath>
<fileset dir=3D"${webtest.home}">
<include name=3D"lib/*.jar"/>
<include name=3D"lib/base/*.jar"/>
</fileset>
<pathelement path=3D"${webtest.home}/lib"/>
</classpath>
</taskdef>
Now when I try to run the test by executing "maven webtest:test" I get the =
following error:
webtest:test:
[java] Buildfile: D:\webtest\SimpleTest.xml
[java] Trying to override old definition of task sleep
[java]
[java] main:
[java]
[java] BUILD FAILED
[java] D:\webtest\SimpleTest.xml:11: Canoo Webtest: R_1304.
[java] Test failed.
[java] Test step invoke (D:\webtest\SimpleTest.xml:14: ) named "get Lo=
gin Page" failed with message "Step[invoke "get
Login Page" (1/2)]: HTTP error 404, at: invoke"
[java]
[java] Total time: 8 seconds
I've verified that the web server is running and the configured URL is avai=
lable by requesting it successfully in a browser. Thus I assume the test is=
trying request a different website.
The received error message does not really help to find the error. I've tri=
ed enabling all the loggers in log4j.properties, but unfortunately those se=
em not to work.
So how to debug such an error? Is there a possibility to configure an HTTP =
tunnel as WebTest proxy? Any help is appreciated!
- BitByter
Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: g=FCnsti=
g
und schnell mit DSL - das All-Inclusive-Paket f=FCr clevere Doppel-Sparer,
nur 44,85 =80 inkl. DSL- und ISDN-Grundgeb=FChr!
http://www.arcor.de/rd/emf-dsl-2