|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 16
Messages: 16
Messages: 16
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
HtmlUnit 2.4, a headless java browser, released
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:- 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
You can find more information in the official website, the development team is looking forward to getting your feedback.
|
|
Message #297996
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Jmeter?
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.
|
|
Message #297997
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Comparisons
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).
|
|
Message #297998
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Comparisons
... 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()); }
|
|
Message #297999
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Comparisons
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.
|
|
Message #298090
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Comparisons
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.
|
|
Message #298106
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: sesli
When is that captcha going to be implemented again? At least this list has a nice selection... and transsexuals, so nobody feels left out.
|
|
Message #298887
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Comparisons
... 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.
|
|
Message #299185
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Compare with HTTPClient
How does this compare with HttpClient (from Apache)? http://hc.apache.org/httpclient-3.x/ 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.
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources.
(May 19, Tech Talk)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|