Chapter 4. Testing with JUnit

4.1 What is testing, and why do it?
4.2 Introducing our application
4.3 How to test a program
4.4 Introducing JUnit
4.5 The JUnit task: <junit>
4.6 Generating HTML test reports
4.7 Advanced <junit> techniques
4.8 Best practices
4.9 Summary

“Any program feature without an automated test simply doesn’t exist.”

Kent Beck, Extreme Programming Explained

At this point we’ve learned how Ant can build and run an application. But does the application work? Does it do what we wanted? Sure, we can use Ant to run the program after the compile, and we can then check the output, but is that adequate?

You can write code, but unless you’re going to write tests or formal proofs of correctness, you have no way of knowing ...

Get Ant in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.