<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: How Much Test Coverage Is Enough?</title>
	<atom:link href="http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-much-test-coverage-is-enough</link>
	<description>Summa Blog</description>
	<lastBuildDate>Thu, 17 May 2012 15:31:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: How Much Test Coverage Is Enough Summa Blog &#124; Weak Bladder</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-1281</link>
		<dc:creator>How Much Test Coverage Is Enough Summa Blog &#124; Weak Bladder</dc:creator>
		<pubDate>Mon, 08 Jun 2009 01:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-1281</guid>
		<description>[...] How Much Test Coverage Is Enough Summa Blog   Posted by root 4 hours ago (http://www.summa-tech.com)        Thanks for your comment 3 ladycoder march 24th 2009 at 6 33 pm powered by wordpress log in summa e sales summa tech com p 412 258 3300        Discuss&#160;  &#124;&#160; Bury &#124;&#160;    News &#124; How Much Test Coverage Is Enough Summa Blog [...]</description>
		<content:encoded><![CDATA[<p>[...] How Much Test Coverage Is Enough Summa Blog   Posted by root 4 hours ago (<a href="http://www.summa-tech.com" rel="nofollow">http://www.summa-tech.com</a>)        Thanks for your comment 3 ladycoder march 24th 2009 at 6 33 pm powered by wordpress log in summa e sales summa tech com p 412 258 3300        Discuss&nbsp;  |&nbsp; Bury |&nbsp;    News | How Much Test Coverage Is Enough Summa Blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adriana B.</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-362</link>
		<dc:creator>Adriana B.</dc:creator>
		<pubDate>Fri, 10 Apr 2009 22:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-362</guid>
		<description>I found this article very interesting, and would like to suggest a theme for a future post: what factors  need to be taken into consideration when deciding how much testing is needed?

I am Sr. Business Technology Analyst and my projects range from mission critical to cost-saving but not-capable of causing any damage if a defect goes live. I&#039;d like to know how external factors, such the business impact of a software malfunction, might affect your recommendation of how much test coverage is ideal.</description>
		<content:encoded><![CDATA[<p>I found this article very interesting, and would like to suggest a theme for a future post: what factors  need to be taken into consideration when deciding how much testing is needed?</p>
<p>I am Sr. Business Technology Analyst and my projects range from mission critical to cost-saving but not-capable of causing any damage if a defect goes live. I&#8217;d like to know how external factors, such the business impact of a software malfunction, might affect your recommendation of how much test coverage is ideal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Vechiato</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-358</link>
		<dc:creator>Marcus Vechiato</dc:creator>
		<pubDate>Mon, 06 Apr 2009 12:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-358</guid>
		<description>Your point of view about tests and costs are very interesting. 

The common aproach is &quot;Everyone do tests without show their coverage and never relate their costs&quot;.

Nice work!</description>
		<content:encoded><![CDATA[<p>Your point of view about tests and costs are very interesting. </p>
<p>The common aproach is &#8220;Everyone do tests without show their coverage and never relate their costs&#8221;.</p>
<p>Nice work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Ferguson Smart</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-299</link>
		<dc:creator>John Ferguson Smart</dc:creator>
		<pubDate>Thu, 26 Mar 2009 20:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-299</guid>
		<description>Nice write-up, Handerson. I like the graph. 

There is a lot of debate on this topic, of course, . Tests, and in particular TDD and BDD-style testing,  is not just to verify that the code does things right, but also that the code does the right thing. Certainly, don&#039;t test getters and setters directly, but won&#039;t these be tested indirectly by decent functional tests anyway? 

Test coverage is a metric, a means of seeing how well your code is exercised by your tests. In practice, it is a reasonable indicator that tests are being taken seriously, but, in itself, it provides no guarantee that the tests themselves are of good quality. That said, I like seeing high test coverage in a project. I use it, in conjunction with code reviews, to check that testing practices are being done well.</description>
		<content:encoded><![CDATA[<p>Nice write-up, Handerson. I like the graph. </p>
<p>There is a lot of debate on this topic, of course, . Tests, and in particular TDD and BDD-style testing,  is not just to verify that the code does things right, but also that the code does the right thing. Certainly, don&#8217;t test getters and setters directly, but won&#8217;t these be tested indirectly by decent functional tests anyway? </p>
<p>Test coverage is a metric, a means of seeing how well your code is exercised by your tests. In practice, it is a reasonable indicator that tests are being taken seriously, but, in itself, it provides no guarantee that the tests themselves are of good quality. That said, I like seeing high test coverage in a project. I use it, in conjunction with code reviews, to check that testing practices are being done well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-297</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Thu, 26 Mar 2009 09:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-297</guid>
		<description>Wow, subjective tests written against subjective code using subjective metrics

IMPERICAL DATA!

You are a god dude. 

Cover every line of that subjective code with that subjective test using those subjectively mocked dependency injections.

A god dude.  A god.</description>
		<content:encoded><![CDATA[<p>Wow, subjective tests written against subjective code using subjective metrics</p>
<p>IMPERICAL DATA!</p>
<p>You are a god dude. </p>
<p>Cover every line of that subjective code with that subjective test using those subjectively mocked dependency injections.</p>
<p>A god dude.  A god.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeroen Wenting</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-296</link>
		<dc:creator>Jeroen Wenting</dc:creator>
		<pubDate>Thu, 26 Mar 2009 08:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-296</guid>
		<description>How do you define &quot;100% test coverage&quot; even in the context of unit testing?
Different coverage tools don&#039;t always agree what constitutes &quot;covered code&quot;.
I&#039;ve encountered situations in which one tool would tell me I had 100% coverage on a class, yet another tool counted that same class as being covered something like 60%.
The difference appeared to be that one tool reported non-executable code (like variable and field declarations without initialisers and lines containing only braces) as being uncovered code, and the other skipped them in its analysis.
Neither is tool fully correct here. To count a line containing only a closing brace or an empty statement as uncovered seems wrong, but that variable declaration? If that variable is used yet never initialised, there&#039;s a potential for trouble so the coverage tool should ideally trace testcode to see if the variable initalisation is covered or not, and report the line as covered if and only if all possible uses for the variable are covered by tests. Most tools don&#039;t seem to analyse that deep.

And as Ivo hints at, there&#039;s code to be written in many situations that can be next to impossible to trigger in a test.
Mostly this will be error handling code that&#039;s only triggered in extreme corner cases, that may rely on environmental factors that cannot be reliably replicated in a test (or can&#039;t be without more effort than is warranted given the rarity of the need to execute it).
For such code a lexical analysis of correctness is a better test than spending possibly days writing a test for it when the code itself only gets executed once a year on an application running 24/7.</description>
		<content:encoded><![CDATA[<p>How do you define &#8220;100% test coverage&#8221; even in the context of unit testing?<br />
Different coverage tools don&#8217;t always agree what constitutes &#8220;covered code&#8221;.<br />
I&#8217;ve encountered situations in which one tool would tell me I had 100% coverage on a class, yet another tool counted that same class as being covered something like 60%.<br />
The difference appeared to be that one tool reported non-executable code (like variable and field declarations without initialisers and lines containing only braces) as being uncovered code, and the other skipped them in its analysis.<br />
Neither is tool fully correct here. To count a line containing only a closing brace or an empty statement as uncovered seems wrong, but that variable declaration? If that variable is used yet never initialised, there&#8217;s a potential for trouble so the coverage tool should ideally trace testcode to see if the variable initalisation is covered or not, and report the line as covered if and only if all possible uses for the variable are covered by tests. Most tools don&#8217;t seem to analyse that deep.</p>
<p>And as Ivo hints at, there&#8217;s code to be written in many situations that can be next to impossible to trigger in a test.<br />
Mostly this will be error handling code that&#8217;s only triggered in extreme corner cases, that may rely on environmental factors that cannot be reliably replicated in a test (or can&#8217;t be without more effort than is warranted given the rarity of the need to execute it).<br />
For such code a lexical analysis of correctness is a better test than spending possibly days writing a test for it when the code itself only gets executed once a year on an application running 24/7.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivo</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-295</link>
		<dc:creator>Ivo</dc:creator>
		<pubDate>Thu, 26 Mar 2009 07:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-295</guid>
		<description>I think your graph is rather optimistic and should be much steeper towards the 100%: increased test coverage is strongly subject to the law of diminishing returns. There are at least two clear categories that prevent me from reaching 100%:
1) I&#039;m not going to write unit tests for all those bean getters and setters that don&#039;t do anything apart from accessing the field: that&#039;s a lot of work without any benefit.
2) Defensive coding leads to null checks and catch blocks that are very hard to trigger. They are more like debug statements then real parts of the code. Consequently, there are always lines and branches that are very hard to cover by tests. Of course, you shouldn&#039;t have a zillion of them; as always, it&#039;s about balance.</description>
		<content:encoded><![CDATA[<p>I think your graph is rather optimistic and should be much steeper towards the 100%: increased test coverage is strongly subject to the law of diminishing returns. There are at least two clear categories that prevent me from reaching 100%:<br />
1) I&#8217;m not going to write unit tests for all those bean getters and setters that don&#8217;t do anything apart from accessing the field: that&#8217;s a lot of work without any benefit.<br />
2) Defensive coding leads to null checks and catch blocks that are very hard to trigger. They are more like debug statements then real parts of the code. Consequently, there are always lines and branches that are very hard to cover by tests. Of course, you shouldn&#8217;t have a zillion of them; as always, it&#8217;s about balance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LadyCoder</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-292</link>
		<dc:creator>LadyCoder</dc:creator>
		<pubDate>Tue, 24 Mar 2009 23:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-292</guid>
		<description>I work on a team that practices TDD (Test Driven Development).  We do not have 100% coverage of all of our code, and we are actually quite happy with the coverage that we have.

One important thing to note, 100% test coverage is a nice goal, but it isn&#039;t the most important thing in terms of testing.  What is more important than the amount of code you are covering, is the quality of the tests you have.  I can write test code that will cover 100% of my code, but if it isn&#039;t really testing anything useful, then it is useless.

Unfortunately, there aren&#039;t many good tools (I don&#039;t know of any, but I am sure there are some) that can really test the quality of your test code.  So, looking at code coverage is a metric that a lot of people use to see how well your code is tested.

I am, by no means saying that code coverage is a completely useless statistic, but it needs to be taken with a grain of salt.</description>
		<content:encoded><![CDATA[<p>I work on a team that practices TDD (Test Driven Development).  We do not have 100% coverage of all of our code, and we are actually quite happy with the coverage that we have.</p>
<p>One important thing to note, 100% test coverage is a nice goal, but it isn&#8217;t the most important thing in terms of testing.  What is more important than the amount of code you are covering, is the quality of the tests you have.  I can write test code that will cover 100% of my code, but if it isn&#8217;t really testing anything useful, then it is useless.</p>
<p>Unfortunately, there aren&#8217;t many good tools (I don&#8217;t know of any, but I am sure there are some) that can really test the quality of your test code.  So, looking at code coverage is a metric that a lot of people use to see how well your code is tested.</p>
<p>I am, by no means saying that code coverage is a completely useless statistic, but it needs to be taken with a grain of salt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Handerson Gomes</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-289</link>
		<dc:creator>Handerson Gomes</dc:creator>
		<pubDate>Tue, 24 Mar 2009 20:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-289</guid>
		<description>Good point Ariel, I should have added some references.

I&#039;m using 100% test coverage is the context of Unit Testing. The bigger the number of lines of code in the application executed by unit tests, the bigger the coverage.

Some tools for Test Coverage Report that I&#039;m familiar with:
Cobertura (http://cobertura.sourceforge.net/) is an excellent Open Source tool that can be easily used with Ant and Maven.

Clover (http://www.atlassian.com/software/clover/) is a commercial option with a more rich feature set.

Thanks for your comment.</description>
		<content:encoded><![CDATA[<p>Good point Ariel, I should have added some references.</p>
<p>I&#8217;m using 100% test coverage is the context of Unit Testing. The bigger the number of lines of code in the application executed by unit tests, the bigger the coverage.</p>
<p>Some tools for Test Coverage Report that I&#8217;m familiar with:<br />
Cobertura (<a href="http://cobertura.sourceforge.net/" rel="nofollow">http://cobertura.sourceforge.net/</a>) is an excellent Open Source tool that can be easily used with Ant and Maven.</p>
<p>Clover (<a href="http://www.atlassian.com/software/clover/" rel="nofollow">http://www.atlassian.com/software/clover/</a>) is a commercial option with a more rich feature set.</p>
<p>Thanks for your comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ariel</title>
		<link>http://www.summa-tech.com/blog/2009/03/24/how-much-test-coverage-is-enough/comment-page-1/#comment-288</link>
		<dc:creator>ariel</dc:creator>
		<pubDate>Tue, 24 Mar 2009 20:27:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.summa-tech.com/blog/?p=608#comment-288</guid>
		<description>You state in the first paragraph that 100% test coverage is easy to measure.  How do you define &quot;100% test coverage&quot; and how do you measured it?</description>
		<content:encoded><![CDATA[<p>You state in the first paragraph that 100% test coverage is easy to measure.  How do you define &#8220;100% test coverage&#8221; and how do you measured it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

