[Webtest] Re: Memory Leak in Canoo

Ritesh Trivedi Ritesh Trivedi" <ritesh.trivedi@gmail.com
Mon, 4 Dec 2006 09:50:50 -0800


Marc,

Not sure I understand  your comment. Can you please elaborate?

> is it possible that you declare the webtest tasks for each WebTest?
> Marc.


On 12/4/06, webtest-request@lists.canoo.com
<webtest-request@lists.canoo.com> wrote:
> Send WebTest mailing list submissions to
>        webtest@lists.canoo.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.canoo.com/mailman/listinfo/webtest
> or, via email, send a message with subject or body 'help' to
>        webtest-request@lists.canoo.com
>
> You can reach the person managing the list at
>        webtest-admin@lists.canoo.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of WebTest digest..."
>
>
>
> Today's Topics:
>
>   1. Re: Memory Leak in Canoo? (Rob Manthey)
>   2. Re: Memory Leak in Canoo? (Marc Guillemot)
>   3. Re: NullPointerException using storeLength step against
>       length of zero (Marc Guillemot)
>   4. Re: Spurious warnings? (Marc Guillemot)
>
>
> Message: 1
> Return-Path: <canoo@rob.manthey.id.au>
> Delivered-To: webtest@lists.canoo.com
> Message-ID: <457370D2.3070203@rob.manthey.id.au>
> Date: Mon, 04 Dec 2006 10:50:26 +1000
> From: Rob Manthey <canoo@rob.manthey.id.au>
> User-Agent: Thunderbird 1.5.0.8 (X11/20061025)
> MIME-Version: 1.0
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] Memory Leak in Canoo?
> References: <5e5d9e5f0611291430j2dba9e72hcec609ff3fb96a21@mail.gmail.com>
> In-Reply-To: <5e5d9e5f0611291430j2dba9e72hcec609ff3fb96a21@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Sender: webtest-admin@lists.canoo.com
> Precedence: bulk
> Reply-To: webtest@lists.canoo.com
> Reply-To: Rob Manthey <canoo@rob.manthey.id.au>
> List-Help: <mailto:webtest-request@lists.canoo.com?subject=help>
> List-Post: <mailto:webtest@lists.canoo.com>
> List-Subscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=subscribe>
> List-Id: Canoo WebTest Interest List <webtest.lists.canoo.com>
> List-Unsubscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=unsubscribe>
> List-Archive: <http://lists.canoo.com/pipermail/webtest/>
>
> Hi.  I've encountered the symptom of excessive memory consumption, but
> have been told previously that I am most likely using something
> incorrectly and that the problem is avoidable.  It may be that you have
> triggered the same behavior, and perhaps one of the gurus can advise
> further.  Otherwise I too would be happy if you are right and the
> problem could be identified and written out of the codebase.
> RM
>
> on 30/11/06 08:30 Ritesh Trivedi said the following:
> > Hi,
> >
> > I am calling Canoo testcase programatically through Ant API from my
> > java program. There is a memory leak in Canoo which causes
> > OOMException after 10-12 th call to the Canoo target. Note: Non canoo
> > based targets in the ant build files work fine without issues (loop
> > forever without any leaks).
> >
> > I ran JProbe on it and have found multiple locations one specific
> > issue I remember was classloader specific static variables are being
> > declared, my feeling is its causing AntClassLoader to hang around and
> > new Antclassloader loads another set of classes eventually going out
> > of memory.
> >
> > Has anyone encountered this problem?
> > ___________________________________
>
>
>
> Message: 2
> Return-Path: <mguillemot@yahoo.fr>
> Delivered-To: webtest@gate2.canoo.com
> Message-ID: <4573DCA1.7050407@yahoo.fr>
> Date: Mon, 04 Dec 2006 09:30:25 +0100
> From: Marc Guillemot <mguillemot@yahoo.fr>
> User-Agent: Thunderbird 1.5.0.8 (X11/20061025)
> MIME-Version: 1.0
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] Memory Leak in Canoo?
> References: <5e5d9e5f0611291430j2dba9e72hcec609ff3fb96a21@mail.gmail.com>
> In-Reply-To: <5e5d9e5f0611291430j2dba9e72hcec609ff3fb96a21@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Sender: webtest-admin@lists.canoo.com
> Precedence: bulk
> Reply-To: webtest@lists.canoo.com
> Reply-To: Marc Guillemot <mguillemot@yahoo.fr>
> List-Help: <mailto:webtest-request@lists.canoo.com?subject=help>
> List-Post: <mailto:webtest@lists.canoo.com>
> List-Subscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=subscribe>
> List-Id: Canoo WebTest Interest List <webtest.lists.canoo.com>
> List-Unsubscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=unsubscribe>
> List-Archive: <http://lists.canoo.com/pipermail/webtest/>
>
> Hi,
>
> is it possible that you declare the webtest tasks for each WebTest?
>
> Marc.
>
> Ritesh Trivedi wrote:
> > Hi,
> >
> > I am calling Canoo testcase programatically through Ant API from my
> > java program. There is a memory leak in Canoo which causes
> > OOMException after 10-12 th call to the Canoo target. Note: Non canoo
> > based targets in the ant build files work fine without issues (loop
> > forever without any leaks).
> >
> > I ran JProbe on it and have found multiple locations one specific
> > issue I remember was classloader specific static variables are being
> > declared, my feeling is its causing AntClassLoader to hang around and
> > new Antclassloader loads another set of classes eventually going out
> > of memory.
> >
> > Has anyone encountered this problem?
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >
>
>
>
> Message: 3
> Return-Path: <mguillemot@yahoo.fr>
> Delivered-To: webtest@gate2.canoo.com
> Message-ID: <4573DD2C.8020308@yahoo.fr>
> Date: Mon, 04 Dec 2006 09:32:44 +0100
> From: Marc Guillemot <mguillemot@yahoo.fr>
> User-Agent: Thunderbird 1.5.0.8 (X11/20061025)
> MIME-Version: 1.0
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] NullPointerException using storeLength step against
>  length of zero
> References: <ff5690b80611291136v3895dac0q3a2763a077ce19b6@mail.gmail.com>        <FDECKBKBGOHEGDCBMOMLAENFIMAA.dierk.koenig@canoo.com> <ff5690b80611291449s10ce71e7ma963c313306c4be4@mail.gmail.com>
> In-Reply-To: <ff5690b80611291449s10ce71e7ma963c313306c4be4@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Sender: webtest-admin@lists.canoo.com
> Precedence: bulk
> Reply-To: webtest@lists.canoo.com
> Reply-To: Marc Guillemot <mguillemot@yahoo.fr>
> List-Help: <mailto:webtest-request@lists.canoo.com?subject=help>
> List-Post: <mailto:webtest@lists.canoo.com>
> List-Subscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=subscribe>
> List-Id: Canoo WebTest Interest List <webtest.lists.canoo.com>
> List-Unsubscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=unsubscribe>
> List-Archive: <http://lists.canoo.com/pipermail/webtest/>
>
> Hi Lars,
>
> can you provide the whole stacktrace? Using WebTest directly it comes on
> the console. I don't know if it's the case too when running WebTest from
> Groovy (you may have to play with the log4j config file).
>
> Marc.
>
> Lars Burgess wrote:
> > Thanks for the quick reply. Unfortunately, I'm still getting the same
> > NullPointerException. I'm using the latest webtest build in maven format
> > (R_1440) which uses groovy-all-1.0-jsr-06. All of my other test cases
> > which store properties run successfully written in the format:
> >
> > storeHeader(name: 'cookie', property: 'cookieHeader')
> >
> > Anything else I should try?
> >
> > Thanks,
> > Lars
> >
> >
> > On 11/29/06, *Dierk Koenig* < dierk.koenig@canoo.com
> > <mailto:dierk.koenig@canoo.com>> wrote:
> >
> >     I don't think that this is the root cause of your issue but it may
> >     be that in the
> >     Groovy version you are using "property" is still a keyword.
> >     please try
> >     storeLength('property': 'contentLength')
> >
> >     ciao
> >     Dierk
> >
> >         -----Original Message-----
> >         *From:* webtest-admin@lists.canoo.com
> >         <mailto:webtest-admin@lists.canoo.com> [mailto:
> >         webtest-admin@lists.canoo.com
> >         <mailto:webtest-admin@lists.canoo.com>]*On Behalf Of *Lars Burgess
> >         *Sent:* Mittwoch, 29. November 2006 20:37
> >         *To:* webtest@lists.canoo.com <mailto:webtest@lists.canoo.com>
> >         *Subject:* [Webtest] NullPointerException using storeLength step
> >         against length of zero
> >
> >         Hello,
> >
> >         I'm seeing the following exception when I invoke a url that
> >         returns zero content (which is expected in this test case):
> >
> >
> >         Test Case (in groovy):
> >
> >         invoke(description: 'Positive: Verify server returns no content
> >         if cache is correct',
> >                url: CACHED_URL)
> >
> >         storeLength(property: 'contentLength')
> >
> >         verifyProperty(description: 'content-length should be 0',
> >                        name: 'contentLength',
> >                        text: '0')
> >
> >
> >         Exception(from webtest report):
> >
> >         com.canoo.webtest.engine.StepExecutionException
> >
> >
> >               Message
> >
> >         Unexpected exception caught: java.lang.NullPointerException
> >
> >
> >               Stacktrace
> >
> >         com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: java.lang.NullPointerException, Step: InvokePage at :  with (taskName="invoke")
> >               at com.canoo.webtest.steps.Step.handleUnexpectedException
> >
> >         (Step.java:413)
> >               at com.canoo.webtest.steps.AbstractBrowserAction.handleUnexpectedException(AbstractBrowserAction.java:120)
> >               at com.canoo.webtest.steps.request.TargetHelper.protectedGoto(TargetHelper.java:115)
> >               at
> >         com.canoo.webtest.steps.request.AbstractTargetAction.gotoTarget(AbstractTargetAction.java:106)
> >               at com.canoo.webtest.steps.request.AbstractTargetAction.doExecute(AbstractTargetAction.java:78)
> >               at com.canoo.webtest.steps.Step.execute
> >
> >         (Step.java:106)
> >               at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >               at org.apache.tools.ant.Task.perform(Task.java:364)
> >               at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java
> >
> >         :43)
> >               at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
> >               at com.canoo.webtest.steps.Step.execute(Step.java:106)
> >               at org.apache.tools.ant.Task.perform(Task.java:364)
> >               at com.canoo.webtest.ant.WebtestTask.execute
> >
> >         (WebtestTask.java:164)
> >               at org.apache.tools.ant.Task.perform(Task.java:364)
> >               at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:177)
> >               at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:175)
> >
> >
> >               at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:138)
> >               at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:86)
> >               at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:163)
> >               at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod
> >
> >         (InvokerHelper.java:104)
> >               at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85)
> >               at net.mobio.webtest.tests.CacheControlTest.testCacheControlDigest(CacheControlTest.groovy
> >         :68)
> >
> >               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >               at java.lang.reflect.Method.invoke
> >
> >         (Unknown Source)
> >               at junit.framework.TestCase.runTest(TestCase.java:154)
> >               at junit.framework.TestCase.runBare(TestCase.java:127)
> >               at junit.framework.TestResult$1.protect(TestResult.java:106)
> >               at junit.framework.TestResult.runProtected
> >
> >         (TestResult.java:124)
> >               at junit.framework.TestResult.run(TestResult.java:109)
> >               at junit.framework.TestCase.run(TestCase.java:118)
> >               at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >               at junit.framework.TestSuite.run
> >
> >         (TestSuite.java:203)
> >               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >
> >               at java.lang.reflect.Method.invoke(Unknown Source)
> >               at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> >               at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
> >         AbstractDirectoryTestSuite.java
> >         :135)
> >               at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> >               at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >               at sun.reflect.NativeMethodAccessorImpl.invoke0
> >
> >         (Native Method)
> >               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >               at java.lang.reflect.Method.invoke(Unknown Source)
> >               at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
> >
> >         (SurefireBooter.java:225)
> >               at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
> >         Caused by: java.lang.NullPointerException
> >               at org.apache.commons.io.IOUtils.copy(IOUtils.java:996)
> >               at
> >         org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:217)
> >               at com.gargoylesoftware.htmlunit.WebResponseData.getBody(WebResponseData.java:150)
> >               at com.gargoylesoftware.htmlunit.WebResponseData.<init>(WebResponseData.java
> >
> >         :105)
> >               at com.gargoylesoftware.htmlunit.HttpWebConnection.makeWebResponse(HttpWebConnection.java:387)
> >               at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:128)
> >               at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection
> >
> >         (WebClient.java:1371)
> >               at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1329)
> >               at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:322)
> >               at com.gargoylesoftware.htmlunit.WebClient.getPage
> >
> >         (WebClient.java:389)
> >               at com.canoo.webtest.steps.request.TargetHelper.getResponse(TargetHelper.java:69)
> >               at com.canoo.webtest.steps.request.AbstractTargetAction.getResponse(AbstractTargetAction.java:68)
> >               at com.canoo.webtest.steps.request.InvokePage.findTarget
> >
> >         (InvokePage.java:134)
> >               at com.canoo.webtest.steps.request.AbstractTargetAction$1.call(AbstractTargetAction.java:108)
> >               at com.canoo.webtest.steps.request.TargetHelper.protectedGoto(TargetHelper.java:88)
> >               ... 45 more
> >
> >
> >
> >         Is it possible to invoke a url and verify that the content length is zero?
> >         I specifically need to test this because I'm testing that my server is caching content.
> >
> >
> >         Thanks,
> >         Lars
> >
> >
>
>
>
> Message: 4
> Return-Path: <mguillemot@yahoo.fr>
> Delivered-To: webtest@gate2.canoo.com
> Message-ID: <4573F399.4020601@yahoo.fr>
> Date: Mon, 04 Dec 2006 11:08:25 +0100
> From: Marc Guillemot <mguillemot@yahoo.fr>
> User-Agent: Thunderbird 1.5.0.8 (X11/20061025)
> MIME-Version: 1.0
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] Spurious warnings?
> References: <456BC127.7060402@funnelback.com>
> In-Reply-To: <456BC127.7060402@funnelback.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Sender: webtest-admin@lists.canoo.com
> Precedence: bulk
> Reply-To: webtest@lists.canoo.com
> Reply-To: Marc Guillemot <mguillemot@yahoo.fr>
> List-Help: <mailto:webtest-request@lists.canoo.com?subject=help>
> List-Post: <mailto:webtest@lists.canoo.com>
> List-Subscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=subscribe>
> List-Id: Canoo WebTest Interest List <webtest.lists.canoo.com>
> List-Unsubscribe: <http://lists.canoo.com/mailman/listinfo/webtest>,
>        <mailto:webtest-request@lists.canoo.com?subject=unsubscribe>
> List-Archive: <http://lists.canoo.com/pipermail/webtest/>
>
> Hi,
>
> task attributes in an Ant file are not case sensitive and Ant seems to
> take the first method that match in a case insensitive way. Here it's
> the deprecated setFormname instead of setFormName.
>
> This should be fixed in next build. I've removed the deprecated method.
> It's interesting to see that you're the first one to notice this problem
> when these warnings are generated since 1 1/2 years.
>
> Marc.
>
> George Bills wrote:
> > I'm getting a certain warn message from webtest, and I don't see why I
> > should be.
> >
> > The message is:
> > [verifyinputfield]  WARN
> > (com.canoo.webtest.steps.verify.VerifyInputField) - Usage of attribute
> > 'formname' is deprecated - please switch to 'formName'.
> >
> > But I've already changed all of my "formname" to "formName":
> > [gbills@localhost webtest]$ grep "formname" . -R
> > [gbills@localhost webtest]$ grep "formName" . -R
> > ./foor/bar.xml:                 formName="editbyhand"
> >
> > Does anyone know what's going on? Is there any way I can quiet just this
> > exact message? Thanks for any help.
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >
>
>
>
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>
>
>
>