Over a million developers have joined DZone.

Quality Assurance Driven Development - And The Resulting Damage

DZone 's Guide to

Quality Assurance Driven Development - And The Resulting Damage

· Java Zone ·
Free Resource
Everything started with the measurement of JavaDoc coverage. The equation was simple: the more coverage, the better the software quality. But the result is actually sad. When developers are forced to comment every piece of code, they will comment getters/setters as well. It's hardly possible to provide useful comments for straightforward code. The problem is not only in the writing: if you comment obvious code, someone will have to read your documentation too.

Recently, QA departments spotted the opportunity for measurement of unit-test coverage. This makes the situation even worse. Because writing unit tests takes time, it is often much easier to test obvious code in order to raise the test coverage. Meanwhile, I get suspicious when an average corporate project shines with test-coverage greater than 80%. The question then is: what do the remaining 20% consist of?

I encountered a more serious problem in an "agile" project (with a huge amount of unit tests): a considerable unit-test coverage of CRUD-cases (like masterdata management), while some really hard-to-test algorithms were simply skipped, causing problems in production. All because they simply wouldn't have contributed enough to the code-coverage results...

On top of that, you can even generate your tests to increase the coverage. Even System.out.println can be tested and the acronym would be cool as well: Code Driven Test Generation (CDTG).

In summary, instead of believing in numbers, sometimes a portion of common sense could really streamline your development. The problem here is that you then need to get rid of many buzzwords, acronyms, processes, and tools...

From http://blog.adam-bien.com/


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}