Book review “Developer Testing”

Testing is a craft that requires not only effort of a test team. Also developers are obligated to take their share into testing. While wanting to increase the awareness of testing within our development team, I picked up the book “Developer Testing”, written by Alexander Tarlinder. As the title sais, it focuses on what a developer can do to increase the quality of his or her software by testing. In this post I will shortly describe the book and what you could benefit from it.

Setting the stage

The book guides you through what you as a developer can do to add more quality to the software by testing the software. Therefore in the fist chapters it starts asking the question why you eventually should test software. It states that in an Agile environment quality assurance becomes more the role of each of the developers then a solely tester.

After asking the question why you should test, the levels of testing are explained. Examples are smoke testing , system testing and aceptance tesing. This gives a good overview of the scope of each test and the common used words used within the domain of developer testing.

Design by contract is described. A technique you don’t see that many often.

Unit testing

Most of the rest of the book focuses on unit testing, which is of course the most applied technique for developers to test their software. It goes step by step through the concepts of unit testing, without going into detail of a certain unit test framework, like naming.

I firmly believe of the importance of unit testing. It shifts your mindset so you will also more think of exceptional cases and dealing with all kinds of inputs. Also you will go think more about dependencies between other objects.

Dependencies between objects make it harder to unit test. Think of simple objects tight together, but also time- and IO dependencies. Also how do we test communication with web servers? Described is how to decouple this and write clean independent unit tests. For example a mocking framework can help you also with that.

Knowing how to write a unit test is one thing, but how do you know if you’re actually performing the right tests? Therefore the book explains what boundary checking and state transition testing are.

Having unit tests in place, the book describes then how to maintain the tests. If unit tests are hard to maintain, most likely the unit tests will not be maineded and developers only will try them to be able to be executed. Testing the right thing is actually the way to go.

What’s in it for me?

If you are looking for a book that gives an overview of the techniques you can aquire for testing software as a developer, this book will certainly help you a lot.

I felt the book has most benefit for junior and medior software developers. More senior developers will read back a lot that they already know. It will give them a very good overview of how to write proper unit tests, so they test the right and write tests that are maintainable.

If you’re looking by the way for a book that goes real into depth with unit testing, you should also check the book “The Art of Unit Testing” by Roy Osherove.

Posted in Books by Bruno at January 8th, 2020.
Tags:

Leave a Reply