---
title: "Art Of Unit Testing (The Samurai Book)– Get it now, it’s done."
url: "https://osherove.com/blog/2009/5/20/art-of-unit-testing-the-samurai-book-get-it-now-its-done.md"
canonical: "https://osherove.com/blog/2009/5/20/art-of-unit-testing-the-samurai-book-get-it-now-its-done.html"
published: "2009-05-20T14:22:14"
updated: "2009-05-20T14:22:14"
tags: ["Agile", "Art Of Unit Testing", "Unit Testing"]
author: "Roy Osherove"
description: "The time has actually come. After 2.5 years, and two kids, my book is finally done and is available in full form as an EBook. at the end of the month it will be in print form. Now would be the time to get it, when it is…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Art Of Unit Testing (The Samurai Book)– Get it now, it’s done.

By Roy Osherove May 20, 2009 In [Agile](https://osherove.com/blog/category/agile), [Art Of Unit Testing](https://osherove.com/blog/category/art-of-unit-testing), [Unit Testing](https://osherove.com/blog/category/unit-testing)

**Historical article** · Originally published May 20, 2009; technical details may be outdated.

The time has actually come. After 2.5 years, and two kids, [my book is finally done](http://www.manning.com/affiliate/idevaffiliate.php?id=462_91) and is available in full form as an EBook. at the end of the month it will be in print form. Now would be the time to get it, when it is still at a “pre-order” pricing. Get the preorder price either [at Manning](http://www.manning.com/affiliate/idevaffiliate.php?id=462_91)(along with the EBook) or at [the amazon page](https://www.amazon.com/exec/obidos/ASIN/1933988274/iserializable-20).

I love the cover image. How about we call this “The Samurai book” from now on?

This is the book that I wished I had when I started out writing my first tests, and that combines my knowledge about unit testing from the past 5-6 years or so working with companies on real projects (and real failures).

It contains things I have not seen in other places – writing readable, maintainable and trustworthy tests, as well as guidelines on how to review someone else’s tests and what to watch out for.

[![image](https://osherove.com/img/wb/9669266a_weblogs.asp.net_blogs_rosherove_image_6E3CE98B.png)](http://www.manning.com/affiliate/idevaffiliate.php?id=462_91)

I was lucky to have the foreword written by no other than [Michael-Legacy-Code-Feathers](https://www.amazon.com/exec/obidos/ASIN/0131177052/iserializable-20) himself, and with some great quotes including one from Kent Beck about the book.

Here is the [Table of Contents](http://www.manning.com/osherove/excerpt_contents.html).

**Free Chapters**

The book comes with two free chapters:

**Chapter 1** – [The basics of unit testing(PDF)](http://www.manning.com/osherove/SampleChapter1.pdf)

**Chapter 3** – [Using Stubs to Break Dependencies (PDF)](http://www.manning.com/osherove/SampleChapter3.pdf)

Or [get the full book](http://www.manning.com/affiliate/idevaffiliate.php?id=462_91)

**Book description:**

Unit testing, done right, can mean the difference between a failed project and a successful one, between a maintainable code base and a code base that no one dares touch, and between getting home at 2 AM or getting home in time for dinner, even before a release deadline.

_The Art of Unit Testing_ builds on top of what's already been written about this important topic. It guides you step by step from simple tests to tests that are maintainable, readable, and trustworthy. It covers advanced subjects like mocks, stubs, and frameworks such as Typemock Isolator and Rhino Mocks. And you'll learn about advanced test patterns and organization, working with legacy code and even untestable code. The book discusses tools you need when testing databases and other technologies. It's written for .NET developers but others will also benefit from this book.

**What’s inside:**

- Test Review Guidelines
- How to create readable, maintainable, trustworthy tests
- Stubs, mock objects, and automated frameworks
- Working with .NET tools, including NUnit, Rhino Mocks and Typemock Isolator

## More in Agile

[All posts in Agile](https://osherove.com/blog/category/agile)

- May 23, 2009

    ### [Testing that an event was raised](https://osherove.com/blog/2009/5/23/testing-that-an-event-was-raised.html)

- May 22, 2009

    ### [DateTime.LastYear](https://osherove.com/blog/2009/5/22/datetimelastyear.html)

- May 19, 2009

    ### [Introducing Typemock Racer 1.0 – Find multithreaded deadlocks](https://osherove.com/blog/2009/5/19/introducing-typemock-racer-10-find-multithreaded-deadlocks.html)

- May 19, 2009

    ### [TDD with SharePoint – the best movie ever](https://osherove.com/blog/2009/5/19/tdd-with-sharepoint-the-best-movie-ever.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
