Aw: Re: [Webtest] How To Debug Tests

Bit Byter webtest@lists.canoo.com
Tue, 5 Sep 2006 09:39:55 +0200 (CEST)


Hi Paul,

first thanks for your tips.

Yes, the url=3D"/" works for the invoke tag.

And yes, it's the log4j.properties file that was distributed with WebTest (=
Plugin) in folder "${webtest.home}/classes", "$WEBTEST_HOME/lib" respective=
ly in the standalone application.

It's quite annoying having no possibility for debugging tests!  And in this=
 case the received error message is not really helpful.  :(
Isn't there a way to configure an HTTP tunnel as proxy for WebTest?=20

Greetings!


----- Original Nachricht ----
Von:     Paul King <paulk@asert.com.au>
An:      webtest@lists.canoo.com
Datum:   05.09.2006 00:44
Betreff: Re: [Webtest] How To Debug Tests

>=20
> Some suggestions:
>=20
> Does url=3D"/" work in the invoke?
>=20
> Is the log4j.properties you were modifying in path=3D"${webtest.home}/lib=
"?
>=20
> Cheers, Paul.
>=20
> Bit Byter wrote:
> > Hi WebTesters,
> >=20
> > 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.
> >=20
> > I'm trying to run an adapted version of the simple SampleTest.xml from =
the
> Canoo website:
> >=20
> >=20
> > <?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">
> >=20
> >    &taskdef;
> >=20
> >    <target name=3D"main">
> >       <webtest name=3D"myTest">
> >          <config host=3D"127.0.0.1" port=3D"9090" protocol=3D"http"
> basepath=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>
> >=20
> >=20
> > The included "taskdef" entity looks like this:
> >=20
> > <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>
> >=20
> >=20
> > Now when I try to run the test by executing "maven webtest:test" I get =
the
> following error:
> >=20
> > 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 "ge=
t
> Login Page" failed with message "Step[invoke "get
> >  Login Page" (1/2)]: HTTP error 404, at: invoke"
> >     [java]
> >     [java] Total time: 8 seconds
> >=20
> >=20
> > I've verified that the web server is running and the configured URL is
> available by requesting it successfully in a browser. Thus I assume the t=
est
> is trying request a different website.
> >=20
> > The received error message does not really help to find the error. I've
> tried enabling all the loggers in log4j.properties, but unfortunately tho=
se
> seem not to work.
> >=20
> > So how to debug such an error? Is there a possibility to configure an H=
TTP
> tunnel as WebTest proxy? Any help is appreciated!
> >=20
> > - BitByter
> >=20
> > Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
> > ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor:
> g=FCnstig
> > und schnell mit DSL - das All-Inclusive-Paket f=FCr clevere Doppel-Spar=
er,
> > nur  44,85 ?  inkl. DSL- und ISDN-Grundgeb=FChr!
> > http://www.arcor.de/rd/emf-dsl-2
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >=20
> >=20
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20

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