Oreilly - The Art of Unit Testing Video Edition
by Roy Osherove | Released November 2017 | ISBN: None
"This book is something special. The chapters build on each other to a startling accumulation of depth. Get ready for a treat." From the Foreword by Robert C. Martin, cleancoder.com The Art of Unit Testing, Second Edition guides you step by step from writing your first simple tests to developing robust test sets that are maintainable, readable, and trustworthy. You'll master the foundational ideas and quickly move to high-value subjects like mocks, stubs, and isolation, including frameworks such as Moq, FakeItEasy and Typemock Isolator. You'll explore test patterns and organization, working with legacy code, and even "untestable" code. Along the way, you'll learn about integration testing and techniques and tools for testing databases and other technologies. Inside: Create readable, maintainable, trustworthy testsFakes, stubs, mock objects, and isolation (mocking) frameworksSimple dependency injection techniquesRefactoring legacy code The examples in the book use C#, but will benefit anyone using a statically typed language such as Java or C++. Roy Osherove has been coding for over 15 years, and he consults and trains teams worldwide on the gentle art of unit testing and test-driven development. His blog is at ArtOfUnitTesting.com The best way to learn unit testing from what is now a classic in the field. Raphael Faria, LG Electronics Teaches you the philosophy as well as the nuts and bolts for effective unit testing. Pradeep Chellappan, Microsoft When my team members ask me how to write unit tests the right way, I simply answer: Get this book! Alessandro Campeis, Vimar SpA The single best resource on unit testing. Kaleb Pederson, Next IT Corporation NARRATED BY MARK THOMAS Show and hide more
- PART 1 GETTING STARTED
- Chapter 1 - The basics of unit testing 00:09:58
- Chapter 1 - Properties of a good unit test 00:06:55
- Chapter 1 - Drawbacks of nonautomated integration tests compared to automated unit tests 00:07:25
- Chapter 1 - What makes unit tests good 00:06:59
- Chapter 1 - Test-driven development 00:07:24
- Chapter 1 - The three core skills of successful TDD 00:05:41
- Chapter 2 - A first unit test 00:08:22
- Chapter 2 - Introducing the LogAn project 00:06:03
- Chapter 2 - Loading up the solution 00:08:16
- Chapter 2 - Writing your first test 00:09:45
- Chapter 2 - Refactoring to parameterized tests 00:05:32
- Chapter 2 - More NUnit attributes 00:06:08
- Chapter 2 - Checking for expected exceptions 00:08:29
- Chapter 2 - Testing results that are system state changes instead of return values 00:09:27
- PART 2 CORE TECHNIQUES
- Chapter 3 - Using stubs to break dependencies 00:06:05
- Chapter 3 - Determining how to easily test LogAnalyzer 00:04:50
- Chapter 3 - Refactoring your design to be more testable 00:07:59
- Chapter 3 - Dependency injection: inject a fake implementation into a unit under test 00:10:08
- Chapter 3 - Simulating exceptions from fakes 00:15:07
- Chapter 3 - Variations on refactoring techniques 00:03:44
- Chapter 3 - Overcoming the encapsulation problem 00:08:00
- Chapter 4 - Interaction testing using mock objects 00:09:48
- Chapter 4 - The difference between mocks and stubs 00:06:02
- Chapter 4 - A simple handwritten mock example 00:03:40
- Chapter 4 - One mock per test 00:05:14
- Chapter 4 - The problems with handwritten mocks and stubs 00:05:45
- Chapter 5 - Isolation (mocking) frameworks 00:05:39
- Chapter 5 - Dynamically creating a fake object 00:09:54
- Chapter 5 - Simulating fake values 00:08:12
- Chapter 5 - Testing for event-related activities 00:06:38
- Chapter 5 - Advantages and traps of isolation frameworks 00:09:07
- Chapter 6 - Digging deeper into isolation frameworks 00:09:39
- Chapter 6 - How profiler-based unconstrained frameworks work 00:07:35
- Chapter 6 - Values of good isolation frameworks 00:04:54
- Chapter 6 - Ignored arguments by default 00:07:01
- Chapter 6 - Isolation framework design antipatterns 00:07:41
- PART 3 THE TEST CODE
- Chapter 7 - Test hierarchies and organization 00:05:38
- Chapter 7 - Anatomy of a build script 00:05:07
- Chapter 7 - Triggering builds and integration 00:04:59
- Chapter 7 - Mapping out tests based on speed and type 00:05:33
- Chapter 7 - Ensuring tests are part of source control 00:08:00
- Chapter 7 - Cross-cutting concerns injection 00:04:46
- Chapter 7 - Using test class inheritance patterns 00:17:52
- Chapter 7 - Creating test utility classes and methods 00:07:13
- Chapter 8 - The pillars of good unit tests 00:03:12
- Chapter 8 - Writing trustworthy tests 00:12:28
- Chapter 8 - Avoiding logic in tests 00:05:22
- Chapter 8 - Testing only one concern 00:04:12
- Chapter 8 - Assuring code review with code coverage 00:05:30
- Chapter 8 - Writing maintainable tests 00:07:09
- Chapter 8 - Removing duplication 00:09:42
- Chapter 8 - Enforcing test isolation 00:13:55
- Chapter 8 - Avoiding multiple asserts on different concerns 00:05:54
- Chapter 8 - Comparing objects 00:07:14
- Chapter 8 - Writing readable tests 00:05:25
- Chapter 8 - Asserting yourself with meaning 00:06:14
- PART 4 DESIGN AND PROCESS
- Chapter 9 - Integrating unit testing into the organization 00:06:22
- Chapter 9 - Identify possible entry points 00:04:34
- Chapter 9 - Ways to succeed 00:07:48
- Chapter 9 - Aiming for specific goals 00:06:02
- Chapter 9 - Realizing that there will be hurdles 00:06:56
- Chapter 9 - Tough questions and answers 00:07:41
- Chapter 9 - Why is the QA department still finding bugs? 00:08:42
- Chapter 10 - Working with legacy code 00:07:10
- Chapter 10 - Writing integration tests before refactoring 00:03:06
- Chapter 10 - Important tools for legacy code unit testing 00:08:47
- Chapter 10 - Read Michael Feathers’s book on legacy code 00:05:01
- Chapter 11 - Design and testability 00:05:39
- Chapter 11 - Make classes nonsealed by default 00:05:17
- Chapter 11 - Pros and cons of designing for testability 00:06:21
- Chapter 11 - Alternatives to designing for testability 00:06:21
- Chapter 11 - Example of a hard-to-test design 00:04:29
- Chapter 11 - Summary 00:05:08
Show and hide more