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


Coding for Beginners, 2nd Ed (In Easy Steps)

Author: Mike McGrath
Publisher: In Easy Steps
Pages: 192
ISBN:978-1840789751
Print:1840789751
Kindle: B0B56LN77V
Audience: Complete beginners to programming
Rating: 4
Reviewer: Sue Gee

This book aims to introduce hands-on modern programming to complete beginners. Can this be achieved in fewer than 180 [ ... ]



Introducing SQL Server 2019 (Packt)

Author: Kellyn Gorman et al
Publisher: Packt Publishing
Pages: 488
ISBN: 978-1838826215
Print: 1838826211
Kindle: B088BNMRQ4
Audience: SQL Server DBAs and Devs
Rating: 3
Reviewer: Ian Stirk

Each new version of SQL Server introduces new features and enhances others. This book aims to discuss some of these [ ... ]


More Reviews

Last Updated ( Wednesday, 02 November 2016 )