
874
Index
Isolate the SUT, 43–44
Keep Test Logic Out of
Production Code, 45
Keep Tests Independent,
42–43
Minimize Test Overlap, 44
Minimize Untestable Code,
44–45
overview, 39–40
Test Concerns Separately, 47
Use the Front Door First,
40–41
Verify One Condition per Test,
45–47
Write the Tests First, 40
test automation roadmap, 175–181
alternative path verifi cation,
178–179
diffi culties, 175–176
direct output verifi cation, 178
execution and maintenance
optimization, 180–181
happy path code, 177–178
indirect outputs verifi cation,
178–180
maintainability, 176–177
test automation strategies, 49–73
brief tour, 3–8
control points and observation
points, 66–67
cross-functional tests, 52–53
divide and test, 71–72
ensuring testability, 65
fi xture strategies overview, 58–61
interaction styles and testability
patterns, 67–71
overview, 49–50
per-functionality tests, 50–52
persistent fresh fi xtures, 62–63
shared fi xture strategies, 63–65
test-driven testability, 66
tools for, 53–58
transient fresh fi xtures, 61–62
what’s next, 73
wrong, 264
Test Bed. See Prebuilt Fixture
test cases, 811
test code, 811
Test Code Duplication
causes, 214–215
Custom Assertions, 475
Delegated Setup, 412
High Test Maintenance
Cost, 266
impact, 214
In-Line Setup, 89
introduction, 16
possible solution, 216
reducing, 114–119
reducing with Confi gurable
Test Doubles. See Confi gurable
Test Double
reducing with Parameterized
Tests. See Parameterized Test
reducing with Test Utility
Methods. See Test Utility
Method
removing with Testcase Class per
Fixture. See Testcase Class per
Fixture
reusing test code, 162
symptoms, 213–214
Test Commands, 82
Test Concerns Separately, 47
test conditions, 154, 811–812
test database, 812
test debt, 812
Test Dependency in Production,
220–221
Test Discovery
introduction, 78
Lost Tests solution, 271