DEV Community

Discussion on: 100% test coverage: Why or why not?

Collapse
 
cyberhck profile image
Nishchal Gautam

If you just wrote a test and it put your coverage up to 100%, you didn't do TDD, from my own experience, most of the time when you write tests after code, the tests aren't as good.

Write tests first, let it fail, then code, then test again, you'll be almost always 100% covered, and your tests are better.

Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga

Exactly my point! 100% test coverage is a tool, not the goal.