Fri, 24 Sep 2004 09:17:57 +0200
there are two major reasons for excessive memory consumption:
1) too many calls to taskdef
2) large result (xml) files
every time your tests hit a taskdef a new classloader is
constructed reading all webtest (httunit, etc.) classes in Memory.
Try having only one taskdef. The /selftests dir that comes with the
doc.zip give an example on how to do that.
when collecting too many results in one xml file the "append" to that
file first reads the file, parses it, does the append and writes it back.
This can result in a large memory consumption for large suites.
a) use the PlainTextReporter if its output is good enough for your
b) use a new xml file for each test or sub-suite and merge them
I'm afraid we don't have an example for this, yet.
In our environment 2000 Steps is an upper limit for
what we put into one result.xml. A few hundred would be a typical value.
From: email@example.com [mailto:firstname.lastname@example.org]On
Behalf Of Greg Vatman
Sent: Donnerstag, 23. September 2004 21:49
Subject: [Webtest] OutOfMemoryError
I'm attemping to run about 35 automated test cases, but I keep getting an
OutOfMemoryError exception. These functional tests are pretty large and
have many steps involved. I've tried increasing the JVM heap size
using -Xms and -Xmx (in ANT_OPTS), but it doesn't help.
The memory error always seems to occur after the 28th test (at which point a
little over 2000 test steps have been executed).
I've check the mail archive and checked for previous issues:
* showhtmlparseroutput is set to false
* &definition; is only used in the main test suite file
* using the latest version of Ant (1.6.2) and WebTest (507)
Is anyone having success running a large set of tests with many steps? Does
anyone have any other suggestions?
Thanks in advance.