| |
| |
Preface | |
| |
| |
| |
XP Tools | |
| |
| |
Java and XP | |
| |
| |
Tools and Philosophies | |
| |
| |
Open Source Toolkit | |
| |
| |
| |
XP Overview | |
| |
| |
What Is XP? | |
| |
| |
Coding | |
| |
| |
Unit Testing | |
| |
| |
Refactoring | |
| |
| |
Design | |
| |
| |
Builds | |
| |
| |
| |
Ant | |
| |
| |
| |
Writing a Basic Buildfile | |
| |
| |
| |
Running Ant | |
| |
| |
| |
Providing Help | |
| |
| |
| |
Using Environment Variables | |
| |
| |
| |
Passing Arguments to a Buildfile | |
| |
| |
| |
Checking for the Existence of Properties | |
| |
| |
| |
Defining a Classpath | |
| |
| |
| |
Defining Platform-Independent Paths | |
| |
| |
| |
Including and Excluding Files | |
| |
| |
| |
Implementing Conditional Logic | |
| |
| |
| |
Defining a Consistent Environment | |
| |
| |
| |
Preventing Build Breaks | |
| |
| |
| |
Building JAR Files | |
| |
| |
| |
Installing JUnit | |
| |
| |
| |
Running Unit Tests | |
| |
| |
| |
Running Specific Tests | |
| |
| |
| |
Generating a Test Report | |
| |
| |
| |
Checking Out Code from CVS | |
| |
| |
| |
Bootstrapping a Build | |
| |
| |
| |
JUnit | |
| |
| |
| |
Getting Started | |
| |
| |
| |
Running JUnit | |
| |
| |
| |
assertXXX() Methods | |
| |
| |
| |
Unit Test Granularity | |
| |
| |
| |
Set Up and Tear Down | |
| |
| |
| |
One-Time Set Up and Tear Down | |
| |
| |
| |
Organizing Tests into Test Suites | |
| |
| |
| |
Running a Test Class Directly | |
| |
| |
| |
Repeating Tests | |
| |
| |
| |
Test Naming Conventions | |
| |
| |
| |
Unit Test Organization | |
| |
| |
| |
Exception Handling | |
| |
| |
| |
Running Tests Concurrently | |
| |
| |
| |
Testing Asynchronous Methods | |
| |
| |
| |
Writing a Base Class for Your Tests | |
| |
| |
| |
Testing Swing Code | |
| |
| |
| |
Testing with the Robot | |
| |
| |
| |
Testing Database Logic | |
| |
| |
| |
Repeatedly Testing the Same Method | |
| |
| |
| |
HttpUnit | |
| |
| |
| |
Installing HttpUnit | |
| |
| |
| |
Preparing for Test-First Development | |
| |
| |
| |
Checking a Static Web Page | |
| |
| |
| |
Following Hyperlinks | |
| |
| |
| |
Writing Testable HTML | |
| |
| |
| |
Testing HTML Tables | |
| |
| |
| |
Testing a Form Tag and Refactoring Your Tests | |
| |
| |
| |
Testing for Elements on HTML Forms | |
| |
| |
| |
Submitting Form Data | |
| |
| |
| |
Testing Through a Firewall | |
| |
| |
| |
Testing Cookies | |
| |
| |
| |
Testing Secure Pages | |
| |
| |
| |
Mock Objects | |
| |
| |
| |
Event Listener Testing | |
| |
| |
| |
Mock Object Self-Validation | |
| |
| |
| |
Writing Testable JDBC Code | |
| |
| |
| |
Testing JDBC Code | |
| |
| |
| |
Generating Mock Objects with MockMaker | |
| |
| |
| |
Breaking Up Methods to Avoid Mock Objects | |
| |
| |
| |
Testing Server-Side Business Logic | |
| |
| |
| |
Cactus | |
| |
| |
| |
Configuring Cactus | |
| |
| |
| |
Setting Up a Stable Build Environment | |
| |
| |
| |
Creating the cactus.properties File | |
| |
| |
| |
Generating the cactus.properties File Automatically | |
| |
| |
| |
Writing a Cactus Test | |
| |
| |
| |
Submitting Form Data | |
| |
| |
| |
Testing Cookies | |
| |
| |
| |
Testing Session Tracking Using HttpSession | |
| |
| |
| |
Testing Servlet Initialization Parameters | |
| |
| |
| |
Testing Servlet Filters | |
| |
| |
| |
Securing Cactus Tests | |
| |
| |
| |
Using HttpUnit to Perform Complex Assertions | |
| |
| |
| |
Testing the Output of a JSP | |
| |
| |
| |
When Not to Use Cactus | |
| |
| |
| |
Designing Testable JSPs | |
| |
| |
| |
JUnitPerf | |
| |
| |
| |
When to Use JUnitPerf | |
| |
| |
| |
Creating a Timed Test | |
| |
| |
| |
Creating a LoadTest | |
| |
| |
| |
Creating a Timed Test for Varying Loads | |
| |
| |
| |
Testing Individual Response Times Under Load | |
| |
| |
| |
Running a TestSuite with Ant | |
| |
| |
| |
Generating JUnitPerf Tests | |
| |
| |
| |
XDoclet | |
| |
| |
| |
Setting Up a Development Environment for Generated Files | |
| |
| |
| |
Setting Up Ant to Run XDoclet | |
| |
| |
| |
Regenerating Files That Have Changed | |
| |
| |
| |
Generating the EJB Deployment Descriptor | |
| |
| |
| |
Specifying Different EJB Specifications | |
| |
| |
| |
Generating EJB Home and Remote Interfaces | |
| |
| |
| |
Creating and Executing a Custom Template | |
| |
| |
| |
Extending XDoclet to Generate Custom Files | |
| |
| |
| |
Creating an Ant XDoclet Task | |
| |
| |
| |
Creating an XDoclet Tag Handler | |
| |
| |
| |
Creating a Template File | |
| |
| |
| |
Creating an XDoclet xdoclet.xml File | |
| |
| |
| |
Creating an XDoclet Module | |
| |
| |
| |
Tomcat and JBoss | |
| |
| |
| |
Managing Web Applications Deployed to Tomcat | |
| |
| |
| |
Hot Deploying to Tomcat | |
| |
| |
| |
Removing a Web Application from Tomcat | |
| |
| |
| |
Checking If a Web Application Is Deployed | |
| |
| |
| |
Starting Tomcat with Ant | |
| |
| |
| |
Stopping Tomcat with Ant | |
| |
| |
| |
Setting Up Ant to Use Tomcat's Manager Web Application | |
| |
| |
| |
Hot-Deploying to JBoss | |
| |
| |
| |
Hot-Deploying a Web Application to JBoss | |
| |
| |
| |
Testing Against Multiple Servers | |
| |
| |
| |
Additional Topics | |
| |
| |
| |
Testing XML Files | |
| |
| |
| |
Enterprise JavaBeans Testing Tools | |
| |
| |
| |
Avoiding EJB Testing | |
| |
| |
| |
Testing Swing GUIs | |
| |
| |
| |
Testing Private Methods | |
| |
| |
Index | |