Skip to Content
Apache Jakarta and Beyond: A Java Programmer’s Introduction
book

Apache Jakarta and Beyond: A Java Programmer’s Introduction

by Larne Pekowsky
December 2004
Intermediate to advanced content levelIntermediate to advanced
608 pages
11h 47m
English
Addison-Wesley Professional
Content preview from Apache Jakarta and Beyond: A Java Programmer’s Introduction

Chapter 5. Testing Web Sites with HTTPUnit

The ability to test Java classes with a tool like JUnit is of great utility and importance. Because many applications are deployed as Web sites, it would also be tremendously useful to automate the testing of such applications. Manual testing of Web sites consists of a user interacting with the site through a browser, so any automated testing tool should mimic this interaction as closely as possible.

JUnit can be used as a first step toward this ideal testing tool. Writing a JUnit test is a matter of writing a Java class, so anything that can be expressed in Java can be tested. Listing 5.1 demonstrates this flexibility by showing a JUnit test that ensures that the string “Hello” appears on the first page ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java 9 High Performance

Java 9 High Performance

Mayur Ramgir, Nick Samoylov

Publisher Resources

ISBN: 0321237714Purchase book