Recently, Stephen Schaub asked the following on the wewut group:Several of the unit test examples in the book verify the construction of both HTML and plain text strings. Jay recommends using literal strings in the assertions. However, this strikes me …Read more at the source
Michael Feathers, Brian Marick, and I are collaborating to create a new book: Unit Testing Points of View … probably. OriginIn 2014 Martin Fowler provided Technical Review for Working Effectively with Unit Tests. As part of his feedback he said somet…Read more at the source
Today marks the official release release of Working Effectively with Unit Tests. The book is available in various formats:
- DRM free pdf, epub, & mobi (Kindle) at http://leanpub.com/wewut
- Softcover at http://amzn.com/1503242706
- Kindle edition at http://amzn.com/B00QS2HXUO
I’m very happy with the final version. Michael Feathers wrote a great foreword. I incorporated feedback from dozens of people – some that have been friends for years, and some that I’d never previously met. I can’t say enough great things about http://leanpub.com, and I highly recommend it for getting an idea out there and making it easy to get fast feedback.
As far as the softcover edition, I had offers from a few major publishers, but in the end none of them would allow me to continue to sell on leanpub at the same time. I strongly considered caving to the demands of the major publishers, but ultimately the ability to create a high quality softcover and make it available on Amazon was too tempting to pass up.
The feedback has been almost universally positive – the reviews are quite solid on goodreads (http://review.wewut.com). I believe the book provides specific, concise direction for effective Unit Testing, and I hope it helps increase the quality of the unit tests found in the wild.
If you’d like to try before you buy, there’s a sample available in pdf format or on the web.
Read more at the source
Unit Testing has moved from fringe to mainstream, which is a great thing. Unfortunately, as a side effect developers are creating mountains of unmaintainable tests. I’ve been fighting the maintenance battle pretty aggressively for years, and I’ve decided to write a book that captures what I believe is the most effective way to test.
From the Preface
Over a dozen years ago I read Refactoring for the first time; it immediately became my bible. While Refactoring isn’t about testing, it explicitly states: If you want to refactor, the essential precondition is having solid tests. At that time, if Refactoring deemed it necessary, I unquestionably complied. That was the beginning of my quest to create productive unit tests.
Throughout the 12+ years that followed reading Refactoring I made many mistakes, learned countless lessons, and developed a set of guidelines that I believe make unit testing a productive use of programmer time. This book provides a single place to examine those mistakes, pass on the lessons learned, and provide direction for those that want to test in a way that I’ve found to be the most productive.
The book does touch on some theory and definition, but the main purpose is to show you how to take tests that are causing you pain and turn them into tests that you’re happy to work with.
For example, the book demonstrates how to go from…
looping test with many (built elsewhere) collaborators
.. to individual tests that expect literals, limit scope, explicitly define collaborators, and focus on readability
.. to fine-grained tests that focus on testing a single responsibility, are resistant to cascading failures, and provide no friction for those practicing ruthless Refactoring.
As of right now, you can read the first 2 chapters for free at https://leanpub.com/wewut/read
I’m currently ~25% done with the book, and it’s available now for $14.99. My plan is to raise the price to $19.99 when I’m 50% done, and $24.99 when I’m 75% done. Leanpub offers my book with 100% Happiness Guarantee: Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks. Therefore, if you find the above or the free sample interesting, you might want to buy it now and save a few bucks.
Buy Now here: https://leanpub.com/wewut
Read more at the source
DHH recently wrote a provocative piece that gave some views into how he does and doesn’t test these days. While I don’t think I agree with him completely, I applaud his willingness to speak out against TDD dogma. I’ve written publicly about not buying …Read more at the source