The Art of Unit Testing, Third Edition you own this product

with examples in JavaScript
Roy Osherove with Vladimir Khorikov
  • February 2024
  • ISBN 9781617297489
  • 288 pages
  • printed in black & white
  • Available translations: Russian
Look inside
Unit testing is more than just a collection of tools and practices—it’s a state of mind! This bestseller reveals the master’s secrets for delivering robust, maintainable, and trustworthy code.

Thousands of developers have learned to hone their code quality under the tutelage of The Art of Unit Testing. This revised third edition updates an international bestseller to reflect modern development tools and practices, as well as to cover JavaScript.

Inside The Art of Unit Testing, Third Edition you will learn how to:

  • Create readable, maintainable, and trustworthy tests
  • Work with fakes, stubs, mock objects, and isolation frameworks
  • Apply simple dependency injection techniques
  • Refactor legacy code with confidence
  • Test both frontend and backend code

Effective unit tests streamline your software development process and ensure you deliver consistent high-quality code every time. With practical examples in JavaScript and Node, this hands-on guide takes you from your very first unit tests all the way to comprehensive test suites, naming standards, and refactoring techniques. 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 carefully designed so that they apply to code written in any language.

about the technology

The art of unit testing is more than just learning the right collection of tools and practices. It’s about understanding what makes great tests tick, finding the right strategy for each unique situation, and knowing what to do when the testing process gets messy. This book delivers insights and advice that will transform the way you test your software.

about the book

The Art of Unit Testing, Third Edition shows you how to create readable and maintainable tests. It goes well beyond basic test creation into organization-wide test strategies, troubleshooting, working with legacy code, and “merciless” refactoring. You’ll love the practical examples and familiar scenarios that make testing come alive as you read. This third edition has been updated with techniques specific to object-oriented, functional, and modular coding styles. The examples use JavaScript.

what's inside

  • Deciding on test types and strategies
  • Test Entry & Exit Points
  • Refactoring legacy code
  • Fakes, stubs, mock objects, and isolation frameworks
  • Object-Oriented, Functional, and Modular testing styles

about the reader

Examples use JavaScript, TypeScript, and Node.js.

about the authors

Roy Osherove is an internationally-recognized expert in unit testing and agile software methodology. Vladimir Khorikov is the author of Manning’s Unit Testing Principles, Practices, and Patterns, a Pluralsight author, and a Microsoft MVP.

Our testing bible. The JavaScript community is fortunate to have it adapted to our favorite language.

Yoni Goldberg, Node.js testing consultant, author of Node.js Best Practices

A testing masterpiece!

Jaume López, Institut Guttmann

Teaches you the philosophy as well as the nuts and bolts for effective unit testing.

Matteo Gildone, Springer Nature

A proper view of what to test, when, and how to do it well.

Rich Yonts, Teradata
4.8
Out of 5.0
A graph showing this site's review totals.
Overall Rating
100%
of customers that
buy this product give
it a 4 or 5-Star rating.
Verified Buyer
“Great deal”
October 30, 2024 by Josh (Colorado, US)
“I really appreciate the DRM free digital copy.
This has been a great book.”
Verified Buyer
“Great buy”
Unit Testing Made Enjoyable: A Review of The Art of Unit Testing
May 30, 2024 by Richard R. (United Kingdom)
“This book isn't your typical dry tech manual. Roy Osherove takes unit testing, a crucial but sometimes intimidating topic, and makes it engaging and even fun. Whether you're a complete beginner or a seasoned developer, "The Art of Unit Testing" offers a fantastic journey into the world of crafting reliable software.

Osherove breaks down complex concepts into clear steps with plenty of practical examples (this edition switches to JavaScript, but still widely applicable to many languages). You'll find yourself diving into the "how" and "why" of unit testing, not just memorizing formulas.

The book goes beyond just the mechanics, though. It delves into the philosophy of testing, how to tackle tricky legacy code, and how to write tests that are fast, maintainable, and truly confidence-inspiring.

If you're looking to write better code, sleep soundly at night knowing your applications are solid, and maybe even have a little fun while you're at it, then "The Art of Unit Testing" is a must-read. Highly recommend!”
Company Choice
Good range of titles on subjects I am interested in.
Product Choice
Really interested to improve skillset and learn from professionals.
Verified Buyer
“Great value”
May 26, 2024 by Summer T. (Taipei, TW)
“I learned many valuable concepts about writing unit tests and resolved the doubts I encountered in practice. As a front-end developer, it’s truly satisfying to read this book in a familiar language.”
Company Choice
I learned many valuable concepts about writing unit tests and resolved the doubts I encountered in practice. As a front-end developer, it’s truly satisfying to read this book in a familiar language.
Product Choice
I learned many valuable concepts about writing unit tests and resolved the doubts I encountered in practice. As a front-end developer, it’s truly satisfying to read this book in a familiar language.
Verified Buyer
“Great value”
August 30, 2023 by A Reviewer (US)
“This version of Roy Osherove's book is again fantastic. His approach to the discussion of mocks vs stubs and determining which tests to write using inputs and exit points is eye opening. I do wish the book went a little deeper in complexity with mocking and stubbing using isolation frameworks, but that is clearly not the intent of the book.”
Verified Buyer
“Great deal”
January 26, 2021 by Thomas (Bavaria, DE)
“This is for free if you buy the Fourth Edition MEAP. So awesome deal.”

choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • The Art of Unit Testing, Third Edition ebook for free

choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • The Art of Unit Testing, Third Edition ebook for free

choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • The Art of Unit Testing, Third Edition ebook for free
loading book ...