Your Code as a Crime Scene (for Manfred Kampf) by Adam Tornhill

Your Code as a Crime Scene (for Manfred Kampf) by Adam Tornhill

Author:Adam Tornhill
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
ISBN: 978-1-68050-038-7
Publisher: The Pragmatic Bookshelf, LLC (519511)


​ ​ -g maat_src_detailed_test_boundaries.txt​

​ entity,coupled,degree,average-revs

​ Code,End to end Tests,42,50

​ Analysis Test,Code,42,49

​ Code,Parsers Test,41,49

Joe asks:

Code Coverage? Seriously, Is It Any Good?

Code coverage is a simple technique to gain feedback. However, I don’t bother with analyzing coverage until I’ve finished the initial version of a module. But then it gets interesting. The feedback you get is based on your understanding of the application code you just wrote. Perhaps there’s a function that isn’t covered or a branch in the logic that’s never taken?

To get the most out of this measure, try to analyze the cause behind low coverage. Sometimes it’s okay to leave it as is, but more often you’ll find that you’ve overlooked some aspect of the solution.

The specific coverage figure you get is secondary; while it’s possible to write large programs with full coverage, it’s not an end in itself, nor is it meaningful as a general recommendation. It’s just a number. The value you get from code coverage is by the implicit code review you perform when you study uncovered lines.

Finally—and this is a double-edged sword—code coverage can be used for gamification. I’ve seen teams and developers compete with code coverage high scores. To a certain degree this is good. I found it useful when introducing test automation and getting people on a team to pay attention to tests. Who knew automated tests could bring out the competitiveness in us?



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.