Would still love to hear if anyone is still successfully running Groovy 
webtests from Eclipse without getting the error I described below. And if so, 
what versions you're using?

Marc, should I file a bug and if so, would you think it would be with WebTest 
or HtmlUnit?
Thanks,
Lynn

________________________________
Sent: Tuesday, July 27, 2010 10:20 AM
To: '[email protected]'
Subject: [Webtest] Can't get GoogleWebtestTest to run from Eclipse IDE

I wanted to introduce the latest webtest into our project specifically to write 
webtests in groovy and be able to run them individually from the IDE.

I started with the latest R1805.  Followed the instructions on Marc's blog: 
http://mguillem.wordpress.com/2009/04/30/webtest-with-groovy-maven-and-eclipse/

After putting in numerous hours getting over a variety of hurdles (like 
switching to junit 4, and making my own build of 1805 with the patch suggested 
in WT-530
(http://webtest-community.canoo.com/jira/browse/WT-530?page=history) to get 
over webtest from the IDE not liking to load the webtest jar from a repository 
path that has spaces in it, I eventually stalled out with the following error 
being thrown.   (Marc, any reason why that patch from March 2010 for WT-530 
can't be made for the next release?)

I put the standard tests from wt.createProject in and was trying to get it 
going using those before writing my own tests.  However when I run the 
GroovyWebtestTest.groovy as a Junit test from eclipse it fails with:

I'm just putting the most relevant part of the stack trace here because the 
list keeps rejecting my post as "too long".  Will put complete stack trace in 
an accompanying post.

--- Nested Exception ---
java.lang.NullPointerException
          at 
com.gargoylesoftware.htmlunit.javascript.host.Event.<init>(Event.java:273)
          at 
com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1143)
          at 
com.gargoylesoftware.htmlunit.html.HtmlPage.isOnbeforeunloadAccepted(HtmlPage.java:2060)
        at 
com.gargoylesoftware.htmlunit.TopLevelWindow.close(TopLevelWindow.java:113)
        at 
com.canoo.webtest.engine.WebClientContext.destroy(WebClientContext.java:332)
        at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:232)

...
I searched a good bit for any info/bug-reports/work-arounds for this problem 
that seems to be with htmlunit when being run from in the IDE, but although I 
found a complaint from one guy saying he gets this problem intermittently with 
htmlunit 2.7 and 2.8-SNAPSHOT  here: 
http://sourceforge.net/tracker/?func=detail&atid=448266&aid=2983573&group_id=47038
  but see no resolution or action on it so far and for me it isn't intermittent.

And found something possibly similar here: 
http://sourceforge.net/tracker/?func=detail&atid=448266&aid=2923141&group_id=47038
  but no resolution.

I even decided to go back to the WebTest 3.0 release (R1758) and then swapped 
out the htmlunit 2.4 that was a dependency with that to htmlunit 2.6 to get 
over the failures due to google changing their js and after doing this I still 
get the same exact error as shown above.

Can anyone else let me know if they have the setup described at the blog 
working without getting the error shown above?



This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to