The Art of Unit Testing With Examples in JavaScript, 3rd Edition

The Art of Unit Testing, Third Edition 版本: with examples in JavaScript
by 作者: Roy Osherove (Author), Vladimir Khorikov (Author)
Publisher Finelybook 出版社: Manning
Edition 版本: 3rd ed.
Publication Date 出版日期: 2024-03-26
Language 语言: English
pages 页数: : 288 pages
ISBN-10 书号: 1617297488
ISBN-13 书号: 9781617297489


Book Description
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.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

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 Author

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.


Table of contents

PART 1
1 The basics of unit testing
2 A first unit test
PART 2
3 Breaking dependencies with stubs
4 Interaction testing using mock objects
5 Isolation frameworks
6 Unit testing asynchronous code
PART 3
7 Trustworthy tests
8 Maintainability
PART 4
9 Readability
10 Developing a testing strategy
11 Integrating unit testing into the organization
12 Working with legacy code
Appendix Monkey-patching functions and modules

Review

"A book that is seeing a third release must be awesome and this book certainly is." - Sander Zegveld "A didactic and entertaining approach to learning the intricacies of unit testing. Gives the the reader a solid mental framework to work with." - Adriaan Beiertz "Previous editions of the book were widely regarded as one of the best books in Unit Testing. The decision to update it to include examples in JavaScript (according to most surveys, the most used programming language in the world) is a smart move, making the book more directly applicable to most programmers, regardless of their server-side stack." - Jaume Lopez "This book is a must read, for any one who would like to be a better javascript developer or wants to start integrating Unit-Tests into their development process. It is a great balance between technical background and hand on examples." - Charles Lam


About the Author

Roy Osherove is an internationally-recognized expert in unit testing and agile software methodology. Still an active coder, he consults and trains teams worldwide on the gentle art of unit testing and test-driven development. He is also the author of Elastic Leadership (Manning 2016). Roy’s blog is at ArtOfUnitTesting.com.

Vladimir Khorikov is the author of Unit Testing Principles, Practices, and Patterns, Pluralsight author, and Microsoft MVP. He has mentored numerous teams on the ins and outs of unit testing.

Amazon page

下载地址 Download
打赏
未经允许不得转载:finelybook » The Art of Unit Testing With Examples in JavaScript, 3rd Edition

相关推荐

  • 暂无文章

觉得文章有用就打赏一下

您的打赏,我们将继续给力更多优质内容

支付宝扫一扫打赏

微信扫一扫打赏