Developer Testing - Building Quality Into Software

Author: Alexander Tarlinder
Publisher: Addison Wesley
Pages: 336
ISBN: 978-0134291062
Print: 0134291069
Kindle: B01LHSV9ZI
Audience: Software Developers
Rating: 4
Reviewer: Kay Ewbank

 

This book aims to show you how to combine development and testing by writing testable code.

The subtitle of the book is "Building Quality Into Software", and Tarlinder's point is that it's all too easy for developers to concentrate on getting the code working for 'normal' use, and to not pay enough attention to making sure the code works no matter what is thrown at it in production use. While the subject matter sounds as though it could be quite dry, Tarlinder uses good examples and makes his topics sound relevant and interesting.

Banner

The book starts with a chapter defining developer testing, and follows on with one on testing objectives, styles and roles. This describes the different approaches to testing from traditional to agile and behavior-driven.

A chapter on the testing vocabulary is described as essentially one big glossary, with explanations of the matrix of test levels and types, and the agile testing quadrant.

The main theme of the book is that developers need to think about building testing into the development cycle, and the next chapter discusses testability from a developer's perspective. Next the author looks at the concept of programming by contract, where the responsibilities between calling code and called code are formalized. Unit testing and specification-based testing techniques each get a chapter, followed by a discussion of the different types of dependencies and how to deal with them.

For those projects where many similar-looking tests are needed, Tarliner advises using parameterized data-driven tests and combinatorial tests. There's an interesting chapter on 'almost unit tests', by which Tarlinder means tests such as setting up a lightweight server such as a mail server or in-memory database for testing.

 

 

Test doubles - objects that replace a collaborator such as stubs, mocks, fakes and dummies - are covered next, followed by the more formal use of mocking frameworks such as Moq, Mockito and Spock. Two chapters on test-driven development, classic and mockist style, take a longer look at details such as the order in which to write tests, and strategies for making them pass.

The book ends with a set of chapters on working with test code, going beyond unit testing, and the use of test heuristics. 

I found this book to be useful, practical, more generally relevant than I'd expected, and a lot more readable. A good read.

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


Code: The Hidden Language of Computer Hardware and Software 2nd Ed

Top Book 2023
Author: Charles Petzold
Publisher: Microsoft Press
Date: August 2022
Pages: 480
ISBN: 978-0137909100
Print: 0137909101
Kindle: B0B123P5GV
Audience: General
Rating: 5
Reviewer: Mike James
Code! We all need to know about it.



Practices of the Python Pro

Author: Dane Hillard
Publisher: Manning
Date: January 2020
Pages: 248
ISBN: 978-1617296086
Print: 1617296082
Audience: Python developers
Rating: 3
Reviewer: Mike James
I want to be a Python Pro....


More Reviews

Last Updated ( Wednesday, 02 November 2016 )