O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Software Archeology

The difficulty of testing the error path of splitDateTime() and the fact that I could not figure out where the exception supposedly came from bothered me. It was time for an archeological expedition into the project’s history.

Searching back, I discovered that the error handling was added two years prior as part of a different function [4496926]. I also noticed that the body of the try block called a collaborator that was no longer involved in the present day code. About a year ago, it was refactored into its current function [e7c7d40], but the try block still called the collaborator. Finally, I found the code from ten months ago that replaced the original implementation with the current one [b838a21]. The current code could ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required