<?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/"
		>
<channel>
	<title>Comments on: Yet another misunderstanding of TDD, testing, and code coverage</title>
	<atom:link href="http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/</link>
	<description></description>
	<lastBuildDate>Sun, 21 Feb 2010 21:28:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christian Gruber</title>
		<link>http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/comment-page-1/#comment-2026</link>
		<dc:creator>Christian Gruber</dc:creator>
		<pubDate>Sat, 15 Nov 2008 17:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/#comment-2026</guid>
		<description>Hey Mark.  I love testability explorer, and have met its author Misko Hevery, who works for google and his blog is syndacted in Google&#039;s testing blog.  It&#039;s another good tool.</description>
		<content:encoded><![CDATA[<p>Hey Mark.  I love testability explorer, and have met its author Misko Hevery, who works for google and his blog is syndacted in Google&#8217;s testing blog.  It&#8217;s another good tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mlevison</title>
		<link>http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/comment-page-1/#comment-2024</link>
		<dc:creator>mlevison</dc:creator>
		<pubDate>Fri, 07 Nov 2008 16:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/#comment-2024</guid>
		<description>Thanks Christian I&#039;ve been meaning to say something similar for a while you just saved me a whole bunch of effort.

Interestingly I just discovered an interesting Java Tool that has some value in this area: Testability Explorer http://www.testabilityexplorer.org/report - its a tool that scans your source code to see how testable it is.</description>
		<content:encoded><![CDATA[<p>Thanks Christian I&#8217;ve been meaning to say something similar for a while you just saved me a whole bunch of effort.</p>
<p>Interestingly I just discovered an interesting Java Tool that has some value in this area: Testability Explorer <a href="http://www.testabilityexplorer.org/report" rel="nofollow">http://www.testabilityexplorer.org/report</a> &#8211; its a tool that scans your source code to see how testable it is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brockguntersmith</title>
		<link>http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/comment-page-1/#comment-2023</link>
		<dc:creator>brockguntersmith</dc:creator>
		<pubDate>Fri, 07 Nov 2008 15:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/#comment-2023</guid>
		<description>&quot;Any system whose authors have taken the time to sufficiently test it such that it gets &gt; 95% code coverage is likely (in my experience) thinking through how to test their system in order to fully express its happy paths, edge cases, etc.&quot;

Well said. We generally have code coverage in excess of 95% on our apps, not because people are focusing on the number but because our culture (and hard lessons learned from deploying apps with lots of bad bugs and a poor bug process) has encouraged testing as a path to building a better system, saving us grief in the long wrong, helping push the developer to thing through the problem first by writing the tests and thus validate the story (or not) and expose challenges with the task in front of them before diving into the implementation.</description>
		<content:encoded><![CDATA[<p>&#8220;Any system whose authors have taken the time to sufficiently test it such that it gets &gt; 95% code coverage is likely (in my experience) thinking through how to test their system in order to fully express its happy paths, edge cases, etc.&#8221;</p>
<p>Well said. We generally have code coverage in excess of 95% on our apps, not because people are focusing on the number but because our culture (and hard lessons learned from deploying apps with lots of bad bugs and a poor bug process) has encouraged testing as a path to building a better system, saving us grief in the long wrong, helping push the developer to thing through the problem first by writing the tests and thus validate the story (or not) and expose challenges with the task in front of them before diving into the implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marc.mengel</title>
		<link>http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/comment-page-1/#comment-2021</link>
		<dc:creator>marc.mengel</dc:creator>
		<pubDate>Thu, 06 Nov 2008 16:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/#comment-2021</guid>
		<description>I think test coverage metrics, and techniques like operator mutation (change a random operator in the code, retest -- do any tests break? rinse, repeat), are a good way to check whether your user stories and test cases are broad enough.   

But one shouldn&#039;t simply compose a test explicitly to cause a branch of code to be executed and assume that branch as coded is correct; rather you should consider what conditions would lead to that branch, and go back to your user and requirements process, and discuss what should happen under those conditions; then build  test cases for those conditions, and then change your code as needed to pass that new test.

Also, branch coverage isn&#039;t as strong as it might be because branches may be left out entirely. If the code looks like if(a)..elsif(b)...elsif(c)  and there&#039;s no (!a&amp;!b&amp;!c) branch at the end, that may be an un-covered case that needs to be handled, but a branch coverage analysis won&#039;t see it &#039;cause the branch isn&#039;t there at all.

So branch coverage isn&#039;t perfect, but if properly used can be used to discover missing user stories and corresponding test cases.  If it is used as an end in itself, causing people to write random looking tests that happen to pass just to make the coverage numbers look better, then we have a problem.
It seems that Kevin is expecting this latter case; which would obviously be bad.</description>
		<content:encoded><![CDATA[<p>I think test coverage metrics, and techniques like operator mutation (change a random operator in the code, retest &#8212; do any tests break? rinse, repeat), are a good way to check whether your user stories and test cases are broad enough.   </p>
<p>But one shouldn&#8217;t simply compose a test explicitly to cause a branch of code to be executed and assume that branch as coded is correct; rather you should consider what conditions would lead to that branch, and go back to your user and requirements process, and discuss what should happen under those conditions; then build  test cases for those conditions, and then change your code as needed to pass that new test.</p>
<p>Also, branch coverage isn&#8217;t as strong as it might be because branches may be left out entirely. If the code looks like if(a)..elsif(b)&#8230;elsif(c)  and there&#8217;s no (!a&amp;!b&amp;!c) branch at the end, that may be an un-covered case that needs to be handled, but a branch coverage analysis won&#8217;t see it &#8217;cause the branch isn&#8217;t there at all.</p>
<p>So branch coverage isn&#8217;t perfect, but if properly used can be used to discover missing user stories and corresponding test cases.  If it is used as an end in itself, causing people to write random looking tests that happen to pass just to make the coverage numbers look better, then we have a problem.<br />
It seems that Kevin is expecting this latter case; which would obviously be bad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/comment-page-1/#comment-2020</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 05 Nov 2008 15:53:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.agileadvice.com/2008/11/04/uncategorized/yet-another-misunderstanding-of-tdd-testing-and-code-coverage/#comment-2020</guid>
		<description>I think he&#039;s un-necessarily stirring the pot.  I don&#039;t think any sane person would assume that 100% code coverage is the silver bullet.

Code coverage is useful and a great metric, but it must be taken in the context of your entire development process.  CI, functional, system tests and code reviewing your code AND tests make sure that the coverage reports are more meaningful.</description>
		<content:encoded><![CDATA[<p>I think he&#8217;s un-necessarily stirring the pot.  I don&#8217;t think any sane person would assume that 100% code coverage is the silver bullet.</p>
<p>Code coverage is useful and a great metric, but it must be taken in the context of your entire development process.  CI, functional, system tests and code reviewing your code AND tests make sure that the coverage reports are more meaningful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
