| Preface | p. ix |
| XP Tools | p. 1 |
| Java and XP | p. 1 |
| Tools and Philosophies | p. 2 |
| Open Source Toolkit | p. 4 |
| XP Overview | p. 11 |
| What Is XP? | p. 11 |
| Coding | p. 14 |
| Unit Testing | p. 17 |
| Refactoring | p. 22 |
| Design | p. 24 |
| Builds | p. 26 |
| Ant | p. 28 |
| Writing a Basic Buildfile | p. 29 |
| Running Ant | p. 31 |
| Providing Help | p. 32 |
| Using Environment Variables | p. 34 |
| Passing Arguments to a Buildfile | p. 36 |
| Checking for the Existence of Properties | p. 39 |
| Defining a Classpath | p. 40 |
| Defining Platform-Independent Paths | p. 42 |
| Including and Excluding Files | p. 43 |
| Implementing Conditional Logic | p. 44 |
| Defining a Consistent Environment | p. 45 |
| Preventing Build Breaks | p. 46 |
| Building JAR Files | p. 47 |
| Installing JUnit | p. 48 |
| Running Unit Tests | p. 50 |
| Running Specific Tests | p. 53 |
| Generating a Test Report | p. 54 |
| Checking Out Code from CVS | p. 55 |
| Bootstrapping a Build | p. 56 |
| JUnit | p. 59 |
| Getting Started | p. 60 |
| Running JUnit | p. 62 |
| assertXXX() Methods | p. 65 |
| Unit Test Granularity | p. 68 |
| Set Up and Tear Down | p. 69 |
| One-Time Set Up and Tear Down | p. 71 |
| Organizing Tests into Test Suites | p. 73 |
| Running a Test Class Directly | p. 74 |
| Repeating Tests | p. 75 |
| Test Naming Conventions | p. 76 |
| Unit Test Organization | p. 77 |
| Exception Handling | p. 79 |
| Running Tests Concurrently | p. 80 |
| Testing Asynchronous Methods | p. 81 |
| Writing a Base Class for Your Tests | p. 84 |
| Testing Swing Code | p. 85 |
| Testing with the Robot | p. 92 |
| Testing Database Logic | p. 93 |
| Repeatedly Testing the Same Method | p. 94 |
| HttpUnit | p. 99 |
| Installing HttpUnit | p. 100 |
| Preparing for Test-First Development | p. 100 |
| Checking a Static Web Page | p. 104 |
| Following Hyperlinks | p. 106 |
| Writing Testable HTML | p. 107 |
| Testing HTML Tables | p. 108 |
| Testing a Form Tag and Refactoring Your Tests | p. 111 |
| Testing for Elements on HTML Forms | p. 113 |
| Submitting Form Data | p. 116 |
| Testing Through a Firewall | p. 120 |
| Testing Cookies | p. 120 |
| Testing Secure Pages | p. 122 |
| Mock Objects | p. 124 |
| Event Listener Testing | p. 125 |
| Mock Object Self-Validation | p. 130 |
| Writing Testable JDBC Code | p. 133 |
| Testing JDBC Code | p. 135 |
| Generating Mock Objects with MockMaker | p. 138 |
| Breaking Up Methods to Avoid Mock Objects | p. 140 |
| Testing Server-Side Business Logic | p. 142 |
| Cactus | p. 145 |
| Configuring Cactus | p. 148 |
| Setting Up a Stable Build Environment | p. 149 |
| Creating the cactus.properties File | p. 155 |
| Generating the cactus.properties File Automatically | p. 157 |
| Writing a Cactus Test | p. 159 |
| Submitting Form Data | p. 162 |
| Testing Cookies | p. 167 |
| Testing Session Tracking Using HttpSession | p. 170 |
| Testing Servlet Initialization Parameters | p. 176 |
| Testing Servlet Filters | p. 177 |
| Securing Cactus Tests | p. 180 |
| Using HttpUnit to Perform Complex Assertions | p. 183 |
| Testing the Output of a JSP | p. 183 |
| When Not to Use Cactus | p. 185 |
| Designing Testable JSPs | p. 185 |
| JUnitPerf | p. 187 |
| When to Use JUnitPerf | p. 188 |
| Creating a Timed Test | p. 189 |
| Creating a LoadTest | p. 192 |
| Creating a Timed Test for Varying Loads | p. 194 |
| Testing Individual Response Times Under Load | p. 195 |
| Running a TestSuite with Ant | p. 197 |
| Generating JUnitPerf Tests | p. 198 |
| XDoclet | p. 201 |
| Setting Up a Development Environment for Generated Files | p. 202 |
| Setting Up Ant to Run XDoclet | p. 204 |
| Regenerating Files That Have Changed | p. 207 |
| Generating the EJB Deployment Descriptor | p. 208 |
| Specifying Different EJB Specifications | p. 212 |
| Generating EJB Home and Remote Interfaces | p. 212 |
| Creating and Executing a Custom Template | p. 217 |
| Extending XDoclet to Generate Custom Files | p. 220 |
| Creating an Ant XDoclet Task | p. 222 |
| Creating an XDoclet Tag Handler | p. 226 |
| Creating a Template File | p. 232 |
| Creating an XDoclet xdoclet.xml File | p. 234 |
| Creating an XDoclet Module | p. 237 |
| Tomcat and JBoss | p. 239 |
| Managing Web Applications Deployed to Tomcat | p. 239 |
| Hot Deploying to Tomcat | p. 240 |
| Removing a Web Application from Tomcat | p. 242 |
| Checking If a Web Application Is Deployed | p. 244 |
| Starting Tomcat with Ant | p. 245 |
| Stopping Tomcat with Ant | p. 252 |
| Setting Up Ant to Use Tomcat's Manager Web Application | p. 253 |
| Hot-Deploying to JBoss | p. 254 |
| Hot-Deploying a Web Application to JBoss | p. 255 |
| Testing Against Multiple Servers | p. 256 |
| Additional Topics | p. 258 |
| Testing XML Files | p. 258 |
| Enterprise JavaBeans Testing Tools | p. 259 |
| Avoiding EJB Testing | p. 260 |
| Testing Swing GUIs | p. 262 |
| Testing Private Methods | p. 263 |
| Index | p. 265 |
| Table of Contents provided by Rittenhouse. All Rights Reserved. |