Synopses & Reviews
Unit testing, done right, can mean the difference between a failed project and a successful one, between a maintainable code base and a code base that no one dares touch, and between getting home at 2 AM or getting home in time for dinner, even before a release deadline.
The Art of Unit Testing builds on top of what's already been written about this important topic. It guides you step by step from simple tests to tests that are maintainable, readable, and trustworthy. It covers advanced subjects like mocks, stubs, and frameworks such as Typemock Isolator and Rhino Mocks. And you'll learn about advanced test patterns and organization, working with legacy code and even untestable code. The book discusses tools you need when testing databases and other technologies. It's written for .NET developers but others will also benefit from this book.
Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.
Table of Contents
- The basics of unit testing
- A first unit test
- Using stubs to break dependencies
- Interaction testing using mock objects
- Isolation (mock object) frameworks
- Test hierarchies and organization
- The pillars of good tests
- Integrating unit testing into the organization
- Working with legacy code
Synopsis
The Art of Unit Testing guides the reader on the journey from beginner to master in the subtle art of unit testing. Based on expert author Roy Osherove's real-world development experiences, this book shows developers how to make sure the code that they write actually works as expected, and how to make these verifications as automated as possible. Not only that, the book shows techniques that help to make sure that tests are maintainable, readable, and test the right thing over time.
The author establishes five rules for good unit tests built upon the three major principles that any good test be maintainable, trustworthy, and readable. Clear sections present established best practices, and the book also provides clear guidance on what to test and where to start testing in a legacy code project.
Unlike other books on this topic, this book trades theory for real-world examples. It's designed so that a working developer can start writing better unit tests now. Unlike most Unit Testing and TDD books, most examples are in C# on the .NET platform.
Synopsis
Based on the author's real-world development experiences, this text shows developers how to make sure the code that they write actually works as expected, and how to make these verifications as automated as possible.
About the Author
The chief architect at Typemock, Roy Osherove is one of the original ALT.NET organizers. He consults and trains teams worldwide on the gentle art of unit testing and test-driven development. He frequently speaks at international conferences such as TechEd and JAOO. Roy's blog is at http://www.ISerializable.comISerializable.com.