---
title: "The Art of Unit Testing, 3rd Edition | Roy Osherove"
url: "https://www.artofunittesting.com/index.md"
canonical: "https://www.artofunittesting.com/"
tags: []
author: "Roy Osherove"
description: "The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin."
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/"
---

# The Art of Unit Testing

> The official site of The Art of Unit Testing, 3rd Edition (Manning) by Roy Osherove, with Vladimir Khorikov: readable, maintainable, trustworthy unit tests, plus Roy's TDD and unit testing workshops.

HTML: https://www.artofunittesting.com/ · Guide for AI systems: [llms.txt](https://www.artofunittesting.com/llms.txt) · Full text: [llms-full.txt](https://www.artofunittesting.com/llms-full.txt)

## On the home page

00Official Book Site

### The Art of Unit Testing, 3rd Edition

with Examples in JavaScript. Roy Osherove · Manning

This expanded edition teaches mocks, stubs and dependency injection in functional, modular and object oriented style.

[Buy the book (opens in a new tab)](https://go.osherove.com/aout3) [Explore workshops](https://www.artofunittesting.com/languages)

Print + ebook from Manning · Buy links go to Manning and include Roy’s affiliate code.

 [![Cover of The Art of Unit Testing, Third Edition, by Roy Osherove (Manning)](https://www.artofunittesting.com/img/c/cover-400.jpg)](https://go.osherove.com/aout3)

01The book

#### The 3rd edition

[The Art of Unit Testing, Third Edition (opens in a new tab)](https://go.osherove.com/aout3) updates an international bestseller to reflect modern development tools and practices.

You’ll explore test patterns and organization, working with legacy code, and even “untestable” code. The many tool-agnostic examples are presented in JavaScript, and are carefully designed so that they apply to code written in any language.

[More about the 3rd edition](https://www.artofunittesting.com/art-of-unit-testing-3rd-edition)

02Workshops

#### Choose Your Language

Hands-on unit testing and TDD training with Roy, in the language your team writes.

- ![](https://www.artofunittesting.com/img/c/csharp.png)

    3-day hands-on workshop

    ### [TDD & Unit Testing in C#](https://www.artofunittesting.com/tdd-in-c)

    Learn how to write your first test with NUnit or XUnit, learn about mocks, stubs and fakes with isolation frameworks such as FakeItEasy & NSubstitute, and refactor legacy code so you can test it easily.

- ![](https://www.artofunittesting.com/img/c/js.png)

    3-day hands-on workshop

    ### [TDD & Unit Testing in Modern JS](https://www.artofunittesting.com/tdd-in-js)

    Learn to write unit tests for async and observable code, as well as methods of faking functions, modules and other types of dependencies. You’ll explore test patterns and organization, working with legacy code, and even “untestable” code.

- ![](https://www.artofunittesting.com/img/c/java.png)

    3-day hands-on workshop

    ### [TDD in Java with JUnit 5](https://www.artofunittesting.com/tdd-in-java)

    Learn about the practices of TDD, and use JUnit 5 to test-drive new functionality. On the way you’ll learn about readability, maintainability & trustworthy tests.

- ![](https://www.artofunittesting.com/img/c/kotlin.png)

    3-day hands-on workshop

    ### [TDD in Kotlin](https://www.artofunittesting.com/tdd-in-kotlin)

    Start learning the skills of unit testing and TDD in Kotlin with Kotlin-Test, JUnit 5 & mockk.

03Free resources

#### Start here

- Article

    ### [Definition of a unit test](https://www.artofunittesting.com/definition-of-a-unit-test)

    What a “unit of work” is, and the ten properties of a good unit test.

- Checklist

    ### [Test Review Guidelines](https://www.artofunittesting.com/unit-testing-review-guidelines)

    Review every piece of test code for readability, maintainability and trust.

- Videos

    ### [Pair Programming](https://www.artofunittesting.com/pairing-videos)

    Eleven videos of Roy and Raymond Lim test-driving a Go game engine.

- Kata

    ### [String Calculator Kata (opens osherove.com in a new tab)](https://osherove.com/tdd-kata-1)

    The classic TDD kata Roy created, on osherove.com.

04Work with Roy

#### Services by Roy Osherove

![Roy Osherove](https://www.artofunittesting.com/img/author/roy-osherove-2026-photo-480.jpg)

I’m the [founder of Legato Labs](https://legatohq.com/), author of [The Art of Unit Testing](https://www.artofunittesting.com/) and also created the [String Calculator Kata](https://osherove.com/tdd-kata-1). I consult & train teams on various engineering practices & related topics such as:

- [Unit Testing & Test Driven Development](https://www.artofunittesting.com/languages)
- Refactoring & Clean Code
- Continuous Delivery, pipelines & visibility dashboards
- Team Metrics & KPIs such as cycle time, [Mean time to Recovery](https://web.archive.org/web/20181212105306/http://enterprisedevops.org/article/devops-metric-mean-time-to-recovery-mttr-definition-and-reasoning "Archived copy (Wayback Machine)"), Escaped Bugs, Red-To-Green time, Main-Merge-Time and more.

- 01[On-Site Training (opens in a new tab)](https://osherove.com/trainingoptions)
- 02On-Site Coaching/Consulting/Pairing
- 03Remote Test Reviews
- 04Public Training

[Book a service](https://forms.gle/jQSx5KoXvrVA1JCK7)

05Testimonials

#### From workshop attendees

> Rarely are subject experts also great teachers, Roy is the whole package.

Blake RhodesSoftware Engineer

> Very exciting course with precise balance between theory and practice. Roy is an extremely good listener making me not hesitate to get all the answers I need in a very clear way. Even if you have experience with TDD, I highly recommend his TDD Mastery Training.

Diego FariaSoftware Engineer

> Roy is an excellent speaker with a good pace on his course. I will definitely implement what I learn.

Marcio Carneiroreis

> Perfect course, liked the content and educational guidance! Recommend it highly!

Marco Pasopas

> Great course for junior/mid level specialists wanting to start changing their thinking to TDD way of thinking.

Aleksandras Gavinciuk

06Contact

#### Bring a workshop to your team

Training, coaching or remote test reviews: send Roy a message.

[Contact Roy](https://forms.gle/jQSx5KoXvrVA1JCK7)[See services](https://www.artofunittesting.com/services-and-pricing)

## Pages

- [The Art of Unit Testing, 3rd Edition](https://www.artofunittesting.com/art-of-unit-testing-3rd-edition.md): The Art of Unit Testing, Third Edition, by Roy Osherove (Manning): mocks, stubs and dependency injection in functional, modular and object oriented style, with examples in JavaScript.
- [Choose Your Language: TDD workshops](https://www.artofunittesting.com/languages.md): Hands-on unit testing and TDD workshops by Roy Osherove in C#, modern JavaScript, Java (JUnit 5) and Kotlin.
- [TDD & Unit Testing in C# workshop](https://www.artofunittesting.com/tdd-in-c.md): The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin.
- [TDD & Unit Testing in Modern JavaScript workshop](https://www.artofunittesting.com/tdd-in-js.md): The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin.
- [TDD & Unit Testing in Java workshop](https://www.artofunittesting.com/tdd-in-java.md): The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin.
- [TDD & Unit Testing in Kotlin workshop](https://www.artofunittesting.com/tdd-in-kotlin.md): The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin.
- [Definition of a Unit Test](https://www.artofunittesting.com/definition-of-a-unit-test.md): The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin.
- [Test Review Guidelines](https://www.artofunittesting.com/unit-testing-review-guidelines.md): The Art of Unit Testing, 3rd Edition, by Roy Osherove (Manning): readable, maintainable, trustworthy unit tests. Plus hands-on TDD workshops in C#, JavaScript, Java and Kotlin.
- [Pair Programming with TDD videos](https://www.artofunittesting.com/pairing-videos.md): Videos of Roy Osherove pair programming and test-driving a Go game engine with Raymond Lim.
- [Services and Pricing](https://www.artofunittesting.com/services-and-pricing.md): Roy Osherove consults and trains teams on unit testing, TDD, refactoring, continuous delivery and team metrics: on-site training, coaching, remote test reviews and public training.
- [Testimonials](https://www.artofunittesting.com/testimonials.md): What developers say about Roy Osherove's unit testing and TDD workshops.
- [Contact](https://www.artofunittesting.com/contact.md): Contact Roy Osherove about unit testing and TDD workshops, coaching and test reviews.


---

## 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/
