... | @@ -18,8 +18,7 @@ Coverage tools reports gaps in your testing strategy. They make it easy to find |
... | @@ -18,8 +18,7 @@ Coverage tools reports gaps in your testing strategy. They make it easy to find |
|
|
|
|
|
#### T3: Don't Skip Trivial Tests
|
|
#### T3: Don't Skip Trivial Tests
|
|
|
|
|
|
They are easy to write and their documentary value is higher than the cost to produce
|
|
They are easy to write and their documentary value is higher than the cost to produce them.
|
|
them.
|
|
|
|
|
|
|
|
#### T4: An Ignored Test Is a Question about an Ambiguity
|
|
#### T4: An Ignored Test Is a Question about an Ambiguity
|
|
|
|
|
... | @@ -27,13 +26,11 @@ Sometimes we are uncertain about a behavioral detail because the requirements ar |
... | @@ -27,13 +26,11 @@ Sometimes we are uncertain about a behavioral detail because the requirements ar |
|
|
|
|
|
#### T5: Test Boundary Conditions
|
|
#### T5: Test Boundary Conditions
|
|
|
|
|
|
Take special care to test boundary conditions. We often get the middle of an algorithm
|
|
Take special care to test boundary conditions. We often get the middle of an algorithm right but misjudge the boundaries.
|
|
right but misjudge the boundaries.
|
|
|
|
|
|
|
|
#### T6: Exhaustively Test Near Bugs
|
|
#### T6: Exhaustively Test Near Bugs
|
|
|
|
|
|
Bugs tend to congregate. When you find a bug in a function, it is wise to do an exhaustive
|
|
Bugs tend to congregate. When you find a bug in a function, it is wise to do an exhaustive test of that function. You'll probably find that the bug was not alone.
|
|
test of that function. You'll probably find that the bug was not alone.
|
|
|
|
|
|
|
|
#### T7: Patterns of Failure Are Revealing
|
|
#### T7: Patterns of Failure Are Revealing
|
|
|
|
|
... | @@ -43,8 +40,7 @@ As a simple example, suppose you noticed that all tests with an input larger tha |
... | @@ -43,8 +40,7 @@ As a simple example, suppose you noticed that all tests with an input larger tha |
|
|
|
|
|
#### T8: Test Coverage Patterns Can Be Revealing
|
|
#### T8: Test Coverage Patterns Can Be Revealing
|
|
|
|
|
|
Looking at the code that is or is not executed by the passing tests gives clues to why the
|
|
Looking at the code that is or is not executed by the passing tests gives clues to why the failing tests fail.
|
|
failing tests fail.
|
|
|
|
|
|
|
|
#### T9: Tests Should Be Fast
|
|
#### T9: Tests Should Be Fast
|
|
|
|
|
... | | ... | |