
Unit Testing
Vladimir Khorikov · 2020
Programming and computer science › Testing and legacy code
#7,466 most recommended
Hacker News
8
mentions by 4 people · top 35% of 15,732 books
Open Library
—
No ratings yet
1 want to read
Wikipedia
—
No article yet
About the book
A practical guide to unit testing in object-oriented and functional code, with examples mostly in C#. It covers what a unit test is, how to judge test quality, the use of mocks and other test doubles, and how integration tests fit alongside unit tests. Good tests are judged by four attributes: protection against regressions, resistance to refactoring, fast feedback, and maintainability, and these pull against each other so that tests must be chosen with trade-offs in mind. The most valuable tests check observable behavior, usually of business logic with few collaborators, through the public API rather than implementation details. Mocks belong only to unmanaged dependencies, such as external systems that other applications also depend on, and the author argues for the classical (Detroit) school over the London school. Code can be restructured, for example by separating logic from side effects, so that the valuable parts become easy to test.
Written by Claude from what it knows of this book.
What Hacker News says 75% recommend · 0% critical
In the commenters’ own words
Good question. Depends on the reference template, if there is one. Otherwise, Unit Testing: Principles, Practices, and Patterns (Khorikov 2020) suggests…
This article espouses what is known as "classicist testing" school of thought and rejects "mockist/London-style testing". I wholeheartedly agree with it. I…
What Open Library readers say
No Open Library reader has rated it yet.
- 1 want to read
- 1 reading
- 1 have read
What critics say, via Wikipedia
No Wikipedia article about this book yet, so no critics to quote.
Reddit communities — coming later
The threads it came up in
Details
- First published
- 2020
- ISBN
- 9781617296277
- Editions known
- 4 at Open Library
- Open Library
- OL22137664W
Engineering
Read next: its neighbours on the mosaic
XUnit Test PatternsGerard Meszaros · 2007 · recommended by 5 people · similar by subject and what people say about it
Test-driven developmentKent Beck · 2002 · recommended by 30 people · similar by subject and what people say about it
The art of unit testingRoy Osherove · 2009 · recommended by 12 people · similar by subject and what people say about it
Growing object-oriented software, guided by testsSteve Freeman · 2010 · recommended by 43 people · similar by subject and what people say about it
Effective Software TestingMauricio Aniche · 2022 · recommended by 2 people · similar by subject and what people say about it
Agile Software Development, Principles, Patterns, and PracticesRobert C. Martin · 2002 · recommended by 7 people · similar by subject and what people say about it
Working Effectively with Unit TestsJay Fields · 2016 · recommended by 3 people · similar by subject and what people say about it
JUnitKent Beck · 2004 · recommended by 0 people · similar by subject and what people say about it
The RSpec BookDavid Chelimsky · 2010 · recommended by 8 people · similar by subject and what people say about it
Writing Effective Use CasesAlistair Cockburn · 2000 · recommended by 4 people · similar by subject and what people say about it
Test-driven JavaScript developmentChristian Johansen · 2011 · recommended by 4 people · similar by subject and what people say about it
Test-Driven Development with PythonHarry J.W. Percival · 2014 · recommended by 16 people · similar by subject and what people say about it
Lessons learned in software testingCem Kaner · 2001 · recommended by 4 people · similar by subject and what people say about it
Specification by exampleGojko Adzic · 2011 · recommended by 2 people · similar by subject and what people say about it
Writing solid codeSteve Maguire · 1993 · recommended by 18 people · similar by subject and what people say about it
How Google Tests SoftwareJames A. Whittaker · 2012 · recommended by 3 people · similar by subject and what people say about it
Domain-Driven DesignEric Evans · 2003 · recommended by 104 people · similar by subject and what people say about it
Testing computer softwareCem Kaner · 1988 · recommended by 2 people · similar by subject and what people say about it
Patterns of Enterprise Application ArchitectureMartin Fowler · 2002 · recommended by 34 people · similar by subject and what people say about it
Extreme programming explainedKent Beck · 1999 · recommended by 23 people · similar by subject and what people say about it
Major account sales strategyNeil Rackham · 1989 · recommended by 4 people · loosely similar by subject
Implementation patternsKent Beck · 2007 · recommended by 6 people · similar by subject and what people say about it
Test-driven development for embedded CJames W. Grenning · 2011 · recommended by 6 people · similar by subject and what people say about it
Effective TypeScriptDan Vanderkam · 2019 · recommended by 6 people · similar by subject and what people say about it