Skip to content

Commit 84a06f6

Browse files
committed
add info about test coverage
1 parent 61bca6d commit 84a06f6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ So in these examples, I will try to share some tips on what to do to write good
3939
* [Mocking concrete classes](#mocking-concrete-classes)
4040
* [Testing private methods](#testing-private-methods)
4141
* [Time as a volatile dependency](#time-as-a-volatile-dependency)
42+
18. [The Test Coverage shouldn't be the goal](#test-coverage)
4243

4344
## Introduction
4445

@@ -2349,4 +2350,10 @@ final class ValidTest extends TestCase
23492350
self::assertFalse($sut->isVip(FixedClock::create(new \DateTimeImmutable('2019-05-02'))->getCurrentTime()));
23502351
}
23512352
}
2352-
```
2353+
```
2354+
2355+
## 100% Test Coverage shouldn't be the goal
2356+
2357+
100% Coverage is not the goal or even is undesirable because if there is 100% coverage, tests probably will be very fragile, which means refactoring will be very hard.
2358+
Mutation testing gives better feedback about the quality of tests.
2359+
[Read more](https://sarvendev.com/en/2019/06/mutation-testing-we-are-testing-tests/)

0 commit comments

Comments
 (0)