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


Android Programming: The Big Nerd Ranch Guide (5e)

Authors: Bryan Sills, Brian Gardner, Brian Hardy and Kristin Marsicano
Publisher: Addison-Wesley
Pages: 688
ISBN: 978-0137645541
Print: 0137645546
Kindle: B09WLF84W7
Audience: Kotlin programmers
Rating: 4.5
Reviewer: Mike James  

The Big Nerd Ranch Guide to Android is bac [ ... ]



Functional Design (Addison-Wesley)

Author: Robert C. Martin
Publisher: Addison-Wesley
Date: September 2023
Pages: 384
ISBN: 978-0138176396
Print: 0138176396
Kindle: B0CGHQKGYG
Audience: General
Rating: 4.5
Reviewer: Kay Ewbank

This book sets out to explain the principles, patterns and practices of functional design, and why functional prog [ ... ]


More Reviews

Last Updated ( Wednesday, 02 November 2016 )