HtmlUnit is a java unit testing framework for testing web based applications. It is similar in concept to httpunit but is very different in implementation. Which one is better for you depends on how you like to write your tests.
HttpUnit models the http protocol so you deal with request and response objects. HtmlUnit on the other hand, models the returned document so that you deal with pages and forms and tables.
HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes and is intended to be used within another testing framework such as JUnit.
Features
Support for the HTTP and HTTPS protocols. ( JSSE must be in your classpath in order to use HTTPS support)
Support for cookies
Ability to specify whether failing responses from the server should throw exceptions or should be returned as pages of the appropriate type (based on content type)
Support for submit methods POST and GET
Ability to customize the request headers being sent to the server
Support for html responses
o Wrapper for html pages that provides easy access to all information contained inside them
o Support for submitting forms
o Support for clicking links
o Support for walking the DOM model of the html document
Proxy server support
Support for basic authentication
Partial support for javascript (see javascript section below)
JavaScript support
Starting with the 1.1 release, HtmlUnit is supporting javascript. The core javascript language is already fully supported by the Rhino javascript engine.
http://htmlunit.sourceforge.net/
Blog on things around me - Applications, Java Platform, Free & Open Source Software, Gadgets, Utilities...
Subscribe to:
Post Comments (Atom)
Total Pageviews
Reading List - 05-Mar-23
Talking to #AI may be the most important job skill of this century ( JohnGoodPasture ) Role of account management over the years. It’s a ro...
-
Bugzilla is the Bugs/Issues Tracking Tool from The Mozilla Organization. Version 2.18 is the latest stable release. There are couple of res...
-
Two MIT math graduates bump into each other at Fairway on the upper west side. They hadn't seen each other in over 20 years. The first g...
No comments:
Post a Comment