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


Beginning Rust Programming

Author: Ric Messier
Publisher: Wiley
Date: March 2021
Pages: 416
ISBN: 978-1119712978
Print: 1119712971
Kindle: B08WZ2D7WC
Audience: Developers wanting to learn Rust
Rating: 3
Reviewer: Mike James
Everyone seems to want to know what makes Rust special. Does this book give the answers?



The Programmer's Brain (Manning)

Author: Dr. Felienne Hermans
Publisher: Manning
Date: September 2021
Pages: 256
ISBN: 978-1617298677
Print: 1617298670
Kindle: B09CQHBVQZ
Rating: 4
Reviewer: Mike James
Programmers have a brain - but what is it doing?


More Reviews

Last Updated ( Wednesday, 02 November 2016 )