[Webtest] how does followframe work ?

Dierk Koenig webtest@lists.canoo.com
Fri, 30 Jul 2004 12:08:00 +0200


The original httpunit sources do not use log4j but their own
logging mechanism. This mechanism can be enabled through the config
step. This is a (still undocumented) feature:
config can have nested <option> steps just like the <header> steps
with same syntax. Webtest then tries to set the "name"d option
to the boolean "value" - first in the HttpUnitOptions class and if that
fails in the ClientOptions class.
That way, you can set any httpunit option.
See the lists at
http://httpunit.sourceforge.net/doc/api/com/meterware/httpunit/HttpUnitOptio
ns.html
and
http://httpunit.sourceforge.net/doc/api/com/meterware/httpunit/ClientPropert
ies.html

so for enabling the httpunit logging you can use:
<config>
	...
	<option name="LoggingHttpHeaders" value="true"/>
	...
</config>

The log statements below stem from the patches that we applied to
httpunit. If they don't appear although you have set the log4j
properties to the DEBUG level, chances are high that the patches
are not used at all. This happens typically when the patch is
not in the classpath or not loaded _BEFORE_ the original
httpunit classes.
Make sure your classpath, i.e. your taskdef is like in:
http://webtest.canoo.com/manual/troubleshooting.html#Taskdef%20not%20found,
i.e.

<taskdef file="${webtest.home}/webtestTaskdefs.properties">
    <classpath>
        <fileset dir="${webtest.home}">
            <include name="lib/*.jar"/> <!-- sequence is important! -->
            <include name="lib/base/*.jar"/>
        </fileset>
        <pathelement path="${webtest.home}/lib"/>
    </classpath>
</taskdef>


${webtest.home}/lib MUST NOT contain httpunit-1.5.4.jar any longer, but
only httpunit-1.5.4-patch.jar.
httpunit-1.5.4.jar is only to appear in ${webtest.home}/lib/base.

BTW:
When installing the latest build, you should delete the old
${webtest.home} first. (I assume you have a "left-over" httpunit.jar)

cheers
Mittie



-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Marc Guillemot
Sent: Freitag, 30. Juli 2004 11:23
To: webtest@lists.canoo.com
Subject: Re: [Webtest] how does followframe work ?


Parker, Michael wrote:
 >
>>quite strange. I'm surprised not seeing any log messages from
>>httpunit. Have other log settings for it ?
>
> The answer referring to the source of httpunit I have in use here, is,
there
> is no log4j inside of the httpunit-sources.

you're right. No idea what I have done to get messages like:

[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:246) - field =
text/html
[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:244) -
HttpWebResponse.addHeader
[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:245) - key   =
CONTENT-LENGTH
[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:246) - field
= -1
[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:55) -
HttpWebResponse
[url=http://localhost:8080/jnCastor/content.do; headers=
[zkyTestSpec]    CONTENT-TYPE: text/html
[zkyTestSpec]    CONTENT-TYPE: text/html
[zkyTestSpec]    CONTENT-LENGTH: -1
[zkyTestSpec]    TRANSFER-ENCODING: chunked
[zkyTestSpec]    SERVER: Apache-Coyote/1.1
[zkyTestSpec]    EXPIRES: Fri, 30 Jul 2004 10:17:43 GMT
[zkyTestSpec]    DATE: Fri, 30 Jul 2004 09:17:42 GMT ]
[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:56) -
_responseCode = 200
[zkyTestSpec] DEBUG (com.meterware.httpunit.HttpWebResponse:57) -
_responseMessage = OK

and afaik HttpWebResponse don't have 246 lines! I guess that my computer
needs vacation as well.

Marc.
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest