Hi,
JWebUnit trunk was updated to latest version of HtmlUnit.
You may want to checkout and build your own version waiting for an offical
release.
Regards,
Julien
>
>De : Sander A. Smith <smit...@sericontech.com>
>À : jwebunit-users@lists.sourceforge.net
>Envoyé le : Sam 28 Novembre 2009, 0 h 12 min 44 s
>Objet : [JWebUnit-users] JavaScript failures (probably files not loading
>properly)
>
>
>I have a little application that's sort of like a load testing system. It goes
>to a web site that contains a form, fills in some values, pushes a button, and
>then verifies that the next screen contains some text. It does this
>continuously in a loop, and I have 3 of these running in threads in parallel.
>I find that about half of the attempts to do this end in failure with a
>problem related to JavaScript. The site I'm loading loads a Javascript file
>which in turn sucks in several other JavaScript files. My gut feeling is that
>one of these files doesn't download properly which screws everything else up.
>I'm having a hard time diagnosing the problem, and was hoping for some answers:
>1. I can easily call webTester.getPageSource() to see the source of the page
>that was loaded, but that doesn't tell me anything about what gets loaded
>subsequently. Is there some way to determine if a 2nd level load (such as a
>JavaScript file) fails? I'm assuming that these things get loaded by HtmlUnit
>- how do I get access to this info?
>2. I was thinking that perhaps the problem was that the loading of files was
>timing out, so I decided to call webTester.setTimeout(10000) to provide plenty
>of time. Will this affect the timeout of the subsequent HtmlUnit calls for
>JavaScript file that get loaded by the main file loaded? Calling setTimeout
>didn't seem to fix anything for me.
>3. I also noted that all of the JavaScript that's being used requires a bunch
>of memory and threads. It even looks like there are threads that get left over
>after all of the processing is done and I've killed my webTesters. I look at
>the active threads, and find many that are called "JavaScript Job Thread". I
>assume that HtmlUnit is creating these, but I don't know why they continue to
>exist after I've kill the things that initially created them. Anyone have any
>ideas?
>4. Because I believe there are problems with HtmlUnit, I decided to move my
>version from 2.5 to 2.6 (I'm using JWebUnit 2.2). When I try to push a button
>I get a stacktrace:
> java.lang.NoSuchMethodError:
> com.gargoylesoftware.htmlunit.html.HtmlElement.getAttributeValue(Ljava/lang/String;)Ljava/lang/String;
> at
> net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.getButtonWithText(HtmlUnitTestingEngineImpl.java:1384)
>> at
>> net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.hasButtonWithText(HtmlUnitTestingEngineImpl.java:1357)
> at
> net.sourceforge.jwebunit.junit.WebTester.assertButtonPresentWithText(WebTester.java:1826)
>> at
>> net.sourceforge.jwebunit.junit.WebTester.clickButtonWithText(WebTester.java:2531)
>I realize that this really isn't the fault of JWebUnit, but just thought you'd
>like to know.
>Any help with ideas on how I could so;ve these problems would be appreciated.
>
>--
>Sander A. Smith
>President
>
>Sericon Technology Inc.
>71 Marquette Ave.
>Toronto, Ontario M6A 1X8
>(416)781-3988
>
>Link to me on LinkedIn
>http://www.linkedin.com/in/sandersmith
>
>Join our community of people interested in testing Facebook applications
>http://www.TestFacebook.com
>
>Learn about advanced tools for testing social networking applications
>http://www.FriendRunner.com
>
>http://www.sericontech.com
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users