|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 5
Messages: 5
Messages: 5
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
HtmlUnit 1.12 Released
HtmlUnit is a cross-platform 100% Java headless browser intended for use in testing web-based applications in conjunction with unit testing frameworks such as JUnit or TestNG. HtmlUnit allows you to interact with your web application at a high level via an API which enables you to invoke pages, fill out forms, click links, etc. HtmlUnit also contains an advanced implementation of the JavaScript DOM objects, including IE-only features for those who need them.
The latest version of this popular testing tool contains a number of performance improvements, tons of bug fixes, and many new features, including a deterministic AJAX controller, enhanced support for the Prototype JavaScript library, support for script.aculo.us drag and drop, and full support for the jQuery JavaScript library. More details can be found in the change log.
For information on getting started, see this page. The source code and binary packages may be downloaded here. For those who like to live on the edge, the latest snapshot builds are always available here.
Enjoy!
|
|
Message #238031
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: HtmlUnit 1.12 Released
HtmlUnit is too cumbersome to use.
Selenium tests are more readable and easier to write.
|
|
Message #238037
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
What is the point in test HTML?
The idea of unit test is that it either drives the code (Test Driven Development) or proof its correctness (General Practice)
In case of html unit test and the frameworks to do it does not help in any of this two approach.
The first approach is no way applicable to html as the unit test for html are moreover parsing of html DOM and putting assertion on its output. Is it not overkill to drive your html code based on html unit test?
If lets say you use html unit test for second reason then writing html unit test is more erroneous then html code. Is this poor unit test capable of giving code confidence?
Thanks, Shabbir
|
|
Message #238049
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: What is the point in test HTML?
I'm not using TDD: my tests are written (very shortly) after the code is written. And it's true that my HtmlUnit tests don't help me find bugs immedialtely very often. But they are extremely helpful because they provide regression tests. When you start refactoring your code, changing property names in your beans (accessed using EL in the JSPs, which are not refactored), changing URLs in your webapp, etc., running the HtmlUnit test suite helps finding broken links, broken sections, etc. just after a code change. And when you work with less experienced developers, who don't estimate the impact of their code changes correctly, HtmlUnit is a real help. I've also realized that using HtmlUnit forces developers to care more about the simplicity and correctness of their HTML code. I'm very glad HtmlUnit 1.12 is out, because I was waiting for better Ajax and Prototype support since 1.10, and I hope this release will help us cover the areas we weren't able to test yet.
JB.
|
|
Message #238066
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: What is the point in test HTML?
The idea of unit test is that it either drives the code (Test Driven Development) or proof [sic] its correctness (General Practice). If you're using HtmlUnit or any of the other available web app test tools, you're probably not unit testing, technically. You're more likely integration testing, or functional testing, or regression testing.
Of course, if you don't see any value in these sorts of tests, then HtmlUnit is probably not your kind of tool. It's sort of like a last level of automated defense, just to make sure all the pieces fit together as intended before sending the application to the next stage in the delivery process.
Take care,
Daniel
|
|
Message #238219
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: HtmlUnit 1.12 Released
If for instance reliability, speed, detection of js errors, real XPath support, extensibility, etc. matters for you, then you should perhaps have a look.
Otherwise I agree that for normal functional test scenario HtmlUnit API may be to low level, but in this case you should forget Selenium and use Canoo WebTest (http://webtest.canoo.com, which itself uses 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)
Download the entire book of Jakarta-Struts Live and learn about Struts MVC, Tiles, the Validator, DynaActionForms, plug-ins, internationalization, 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)
|
|