Venkatesh-Prasad's Reviews > Working Effectively with Unit Tests

Working Effectively with Unit Tests by Jay Fields
Rate this book
Clear rating

's review

really liked it

If you are beginning with unit testing, then wait to read this book until you are comfortable with writing and executing unit testing for your code (including using test doubles / mocking). Once you are there or are close, read this book to improve your approach to unit testing in terms of what to test, how to test, how to structure tests, where to make trade-offs, what to trade. The book does not give you the exhaustive answers to these questions for all situations. It will provide answers to these questions that are applicable in most situations.

As with the maturity of fast-paced testing community, most of the observations in the book are opinions. As @JayJay Fields himself says "You won’t write better software by blindly following advice." So, consider the opinions/answers and use them as they best suit your needs.

While I agree with most of the observations/practices in the book, my only quip with the book was "do the examples overuse builders and mocks?" I often write unit tests that exercise external dependencies as this tells me when my code breaks due to a change in external dependencies. This may be the reason for my quip. That said, I haven't thought about how to convey the same information without builders/mocks.

In short, if you have just started to diligently write tests for your code, then read this book to write better tests :)

Sign into Goodreads to see if any of your friends have read Working Effectively with Unit Tests.
Sign In »

Reading Progress

April 23, 2017 – Started Reading
April 23, 2017 – Shelved
April 24, 2017 – Finished Reading

No comments have been added yet.