Don’t cheat.

Take your code coverage seriously.

Every line of code should serve a legitimate purpose. The code should either service the business logic as the implementation or demonstrate examples through tests.

In the quest to achieve 100% code coverage or to satisfy a code coverage tool, you need to ensure that all the tests serve a purpose. Never use dummy code to increase code coverage.

If code doesn’t belong, delete it. Any unnecessary code will only cause problems later.

Avoid any temptation to cheat the tools by adding fake tests. If you feel the need to cheat, you’re doing it wrong and should just go home.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: