Measuring JUnit Code Coverage
Measuring JUnit Code Coverage
Who's writing unit tests now?
Why cover code with tests?
How good is your testing?
Code Coverage Tools
How code coverage works
A Code Coverage Report
Package Level Coverage
Line Level Coverage
Commons Math
The Code Coverage Loop
Strategy
Cobertura via Ant
Running Cobertura via Ant
Cobertura via Maven
Different Kinds of Coverage
The Importance of a Minimal API
Why You Only Test the Published API
Don't neglect the test packages
Getting to 100% Tested
Hard Tests
What can't you cover?
Private constructors in utility classes
Uncalled methods in private implementations of public interfaces
fail() statements in test cases
Platform/VM-specific code
Excluding lines from coverage measurements
Alternative Techniques
Jester: a different kind of code coverage tool
Prerequisites
Running Jester
Jester Output
Jester Optimization Techniques
War Stories
Learning from Code Coverage
The package that couldn't work
Another untested package
JavaDoc Problems
Code Coverage as Profiling
Why is this Method called so much?
Reducing Algorithms
Too Far?
What You Can't Find
An Infinite Loop
try-finally
Final Thoughts
To Learn More
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2005, 2006 Elliotte Rusty Harold
Last Modified February 15, 2006