Adam Bien's Weblog
Code Coverage Is Perfect …For Code Deletion
I recently performed system tests which covered all important use cases of the application. I was stunned by the unexpectedly high code coverage of > 80%. At the same time the remaining 20% made me curious. About 15% of the non-covered code was actually superfluous and I immediately deleted it, what further increased the coverage. The remaining parts were irrelevant--like e.g. annotations and enum.
Using code coverage for QA Driven Development may lead to great coverage and poor assert quality.
Special Events: Java 8 with Java EE 7: "More Power with Less Code", 13th October, 2014 and Java EE 7: "Testing and Code Quality", 14th October, 2014 Tweet Follow @AdamBien