- Improved JavaScript support, now all jQuery and Mochikit tests pass, adding to already supported GWT and Sarissa
- Native ActiveX support
- Initial applets handling
- Support for Internet Explorer conditional comments
- And as usual, various bug fixes
-
HtmlUnit 2.4, a headless java browser, released (15 messages)
- Posted by: Ahmed Ashour
- Posted on: December 31 2008 08:15 EST
A new release of the pure GUI-Less browser is available, which allows high-level manipulation of web pages, such as filling forms, clicking links, accessing attributes and values of specific elements within the pages, you do not have to create lower-level requests of TCP/IP or HTTP, but just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed. The most common use of HtmlUnit is test automation of web pages (even with complex JavaScript libraries, like jQuery and Google Web Toolkit), but sometimes it can be used for web scraping, or downloading website content. The main enhancements:Threaded Messages (15)
- Jmeter? by Andrew Replogle on December 31 2008 09:54 EST
- Re: Jmeter? by Marc Guillemot on January 02 2009 04:06 EST
- Comparisons by Jeff Segal on December 31 2008 09:56 EST
- Re: Comparisons by Ruslan Zenin on December 31 2008 10:06 EST
- Re: Comparisons by Ahmed Ashour on December 31 2008 10:13 EST
- Responsive Web Design by Steve Taylor on September 07 2012 01:41 EDT
- Re: Comparisons by John Shuster on December 31 2008 13:34 EST
-
Re: Comparisons by Paul King on January 01 2009 07:38 EST
- Re: Comparisons by John Shuster on January 02 2009 09:53 EST
- Re: Comparisons by Ingo Boegemann on January 05 2009 01:33 EST
-
Re: Comparisons by Paul King on January 01 2009 07:38 EST
- Re: sesli by John Shuster on December 31 2008 13:59 EST
- HtmlUnit and JWebPane : a good match ? by Dominique De Vito on January 02 2009 09:09 EST
- Compare with HTTPClient by null on January 02 2009 16:49 EST
- Re: Compare with HTTPClient by Ahmed Ashour on January 03 2009 00:37 EST
- Thanks for your nice information by Shohel Rana on April 10 2011 15:08 EDT
-
Jmeter?[ Go to top ]
- Posted by: Andrew Replogle
- Posted on: December 31 2008 09:54 EST
- in response to Ahmed Ashour
I wonder how easily this could be implemented as a plugin to jmeter. I know one of the toughest thing about managing more dynamic apps and workflows are getting the regex's correct and hoping the pre-processors work. With something like HtmlUnit you wouldn't have to digg through the posts and responses (with the exception of assertions), just interface with the app more naturally. Sounds cool. -
Re: Jmeter?[ Go to top ]
- Posted by: Marc Guillemot
- Posted on: January 02 2009 04:06 EST
- in response to Andrew Replogle
I believe as well that HtmlUnit has a great role to play in load testing (in fact some users already use it for this purpose). Personally I think that it is too low level to effectively write large test suites and I prefer to use WebTest for that. For a few month, I've started the integration of WebTest with JMeter: http://mguillem.wordpress.com/2008/05/23/webtesthtmlunit-integration-with-jmeter-started/ but I haven't made any progress since this date as I didn't find free time to work on it. -
Comparisons[ Go to top ]
- Posted by: Jeff Segal
- Posted on: December 31 2008 09:56 EST
- in response to Ahmed Ashour
This sounds pretty nice, but I'd still be worried about differences in behavior between this and the browsers I'm actually targeting. I'm also curious if there are tools with similar functionality (whether Java-based or not). -
Re: Comparisons[ Go to top ]
- Posted by: Ruslan Zenin
- Posted on: December 31 2008 10:06 EST
- in response to Jeff Segal
... but I'd still be worried about differences in behavior between this and the browsers I'm actually targeting...
From documentation: Specifying this BrowserVersion will change the user agent header that is sent up to the server and will change the behavior of some of the JavaScript.public void homePage_Firefox() throws Exception { final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_2); final HtmlPage page = webClient.getPage("http://htmlunit.sourceforge.net"); assertEquals("HtmlUnit - Welcome to HtmlUnit", page.getTitleText()); }
-
Re: Comparisons[ Go to top ]
- Posted by: Ahmed Ashour
- Posted on: December 31 2008 10:13 EST
- in response to Jeff Segal
This sounds pretty nice, but I'd still be worried about differences in behavior between this and the browsers I'm actually targeting.
That depends, if your web application doesn't use JavaScript or your application include jQuery, GWT, Mochikit, and/or sarissa, you will have exact behavior as FF2/FF3/IE6/IE7, because HtmlUnit tests already include actual test cases/examples of those libraries. If you use Prototype, Ext JS, Dojo, YUI, you will have some successful cases, and some unsuccessful ones. HtmlUnit has a real active community; some bugs are fixed in few hours if they are simple. If you have a minimal test case, expect a quick response. -
Responsive Web Design[ Go to top ]
- Posted by: Steve Taylor
- Posted on: September 07 2012 01:41 EDT
- in response to Ahmed Ashour
I certainly agree you. In fact you did a great job with your blog too, as you can see you have a lot of visitors and I am very excited with it coz your blog is interactive. Two thumbs up for you. Have a great day.Responsive Webdesign
-
Re: Comparisons[ Go to top ]
- Posted by: John Shuster
- Posted on: December 31 2008 13:34 EST
- in response to Jeff Segal
HtmlUnit is a great library, we can't get by without it. We have 100s of automated downloads that would require users to navigate websites and download reports. Websites targeted use heavy javascript and a mixture of plain html, jsp, coldfusion. We used HttpUnit years ago, that was probably the first hit on google at the time. But no one touched it for several years, so we moved off it and on to this library. I used another tool at one company called iMacros. It's not free and runs strictly on Windows. The only nice thing that you could do is record as you're clicking through the site. Although very simple, it's painful to write the HtmlUnit code for larger tests. One idea would be an automatic code generator via firefox addon that would generate a good starting point. -
Re: Comparisons[ Go to top ]
- Posted by: Paul King
- Posted on: January 01 2009 19:38 EST
- in response to John Shuster
... One idea would be an automatic code generator via firefox addon that would generate a good starting point.
Have you tried the WebTestRecorder firefox plugin? WebTest is a thin layer over the top of HtmlUnit which let's you write your tests in Ant (if you have folk comfortable with XML) or Groovy (if you have folk comfortable with Java or scripting). We use the latter as part of a testing DSL. We tend to heavily refactor what a recorder gives us but it makes a great start for tedious pages. -
Re: Comparisons[ Go to top ]
- Posted by: John Shuster
- Posted on: January 02 2009 09:53 EST
- in response to Paul King
No I haven't, that's basically what I was looking for, thx -
Re: Comparisons[ Go to top ]
- Posted by: Ingo Boegemann
- Posted on: January 05 2009 13:33 EST
- in response to John Shuster
I believe that PushToTest (http://www.pushtotest.com/) can translate both TestGen4Web as well as Selenium tests into HtmlUnit tests -
Re: sesli[ Go to top ]
- Posted by: John Shuster
- Posted on: December 31 2008 13:59 EST
- in response to Ahmed Ashour
When is that captcha going to be implemented again? At least this list has a nice selection... and transsexuals, so nobody feels left out. -
HtmlUnit and JWebPane : a good match ?[ Go to top ]
- Posted by: Dominique De Vito
- Posted on: January 02 2009 09:09 EST
- in response to Ahmed Ashour
At first sight, from a very high level point of view, it looks like the JWebPane project (the GUI part) to come and the HtmlUnit (the non-GUI part) match well. May be an interesting match to come... Dominique http://www.jroller.com/dmdevito -
Compare with HTTPClient[ Go to top ]
- Posted by: null
- Posted on: January 02 2009 16:49 EST
- in response to Ahmed Ashour
How does this compare with HttpClient (from Apache)? http://hc.apache.org/httpclient-3.x/ I have used HttpClient and I'm trying to find out if someone has used both so that they can compare and contrast the two tools. V -
Re: Compare with HTTPClient[ Go to top ]
- Posted by: Ahmed Ashour
- Posted on: January 03 2009 00:37 EST
- in response to null
How does this compare with HttpClient (from Apache)?
HttpClient is actually used by HtmlUnit. HttpClient is a powerful library for lower layer HTTP requests, but doesn't handle JavaScript/browser objects/DOM etc, what are all handled by HtmlUnit.
http://hc.apache.org/httpclient-3.x/ -
Thanks for your nice information[ Go to top ]
- Posted by: Shohel Rana
- Posted on: April 10 2011 15:08 EDT
- in response to Ahmed Ashour
I love this one.