Automated testing is a great way to ensure that code being maintained works. The Extreme Programming (XP) methodology relies heavily on it, and practitioners have available to them a range of testing frameworks, most of which work by making direct calls to the code being tested. But what if you want to test a web application? Or what if you simply want to use a web-site as part of a distributed application?
In either case, you need to be able to bypass the browser and access your site from a program. HttpUnit makes this easy. Written in Java, HttpUnit emulates the relevant portions of browser behavior, including form submission, JavaScript, basic http authentication, cookies and automatic page redirection, and allows Java test code to examine returned pages either as text, an XML DOM, or containers of forms, tables, and links. When combined with a framework such as JUnit, it is fairly easy to write tests that very quickly verify the functioning of a web site.
The same techniques used to test web sites can be used to test and develop servlets without a servlet container using ServletUnit, included in the download.
20 May 2008 | HttpUnit 1.7 released |
2 Apr 2008 | Open Tracker items patches/bug incorporated |
26 Nov 2006 | Switched to subversion repository |
27 Mar 2006 | HttpUnit 1.6.2 released |
6 Mar 2005 | HttpUnit 1.6.1 released |
3 Oct 2004 | HttpUnit 1.6 released |
21 Aug 2003 | HttpUnit 1.5.4 released |
16 May 2003 | New web site format created |
4 Apr 2003 | HttpUnit 1.5.3 released |