<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Unit Tests Coverage: Less Is More</title>
    <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Unit Tests Coverage: Less Is More</title>
      <description>&lt;p&gt;In &lt;span class="caps"&gt;TDD&lt;/span&gt; a unit test has to be very small to isolate failures.  This does funny things to code coverage as a metric.  Each test should have a very small area of effect, and so each unit test should have a negligible effect on the overall code coverage statistic.  Bear with me here, see where I&amp;#8217;m missing out.&lt;/p&gt;


	&lt;p&gt;Say you have an existing (legacy) system with no coverage at all.  Zero percent.  If you start doing &lt;span class="caps"&gt;TDD&lt;/span&gt; today, the overall coverage percentage should barely change at all. If only the new code is test-driven, then the old code is not gaining coverage except where tests are necessary to ensure that the new code is being called.  The low coverage per test is a good thing because it shows that the unit tests have good isolation.  In such a situation, code coverage is really telling you the ratio of new code to old code.  Again, this is so obvious and logical to me that I must be missing some cool subtleties.&lt;/p&gt;


	&lt;p&gt;If all the code was test-driven from the beginning, you should have a very high coverage number, and writing a new unit test &lt;strong&gt;before&lt;/strong&gt; you add code should not impact that number.  You only write enough code to pass the test, so again you aren&amp;#8217;t getting much in the way of uncovered code. A lowering of the ratio might indicate a problem with test-to-production-code ratio.  This seems pretty simple and logical, so I&amp;#8217;m sure I&amp;#8217;m missing some interesting corner cases.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;OTOH&lt;/span&gt;, system tests and integration tests paths through many components at once, and should have a more significant effect on coverage in a previously-untested system, though their job is to prove function points, not to raise the metrics.  These non-unit tests are the thing that boost your coverage of old code. That is also a good effect, because it is the goal of the system test to ensure that the parts work together.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not saying that code coverage should be low, only that as we move incrementally, the unit tests we write should individually have negligible effect on our overall code coverage numbers&amp;#8230; a thought that intrigues me.&lt;/p&gt;</description>
      <pubDate>Mon, 07 May 2007 08:06:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1bd6fe5d-c5ff-4269-a20d-87e7d57443d8</guid>
      <author>tottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more</link>
      <category>Tim's Tepid Torrent</category>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by north face sale</title>
      <description>&lt;p&gt;v&lt;/p&gt;</description>
      <pubDate>Wed, 02 Nov 2011 21:44:05 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ee138f84-6996-4a08-8a98-3600259f363c</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-167112</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by jeremy scott shoes</title>
      <description>&lt;p&gt;Company manufactures shape wears by adding finest element to make the products able to wear in all circumstances. This is all to achieve trust and faith of customers on the company&amp;#8217;s products, which lead to successfully make highest market share. And company has done all this in a very well manner.&lt;/p&gt;</description>
      <pubDate>Fri, 23 Sep 2011 02:23:16 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a81767e9-c6fc-4128-b214-bcc66ccb55a3</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-144697</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by bagsupplyer</title>
      <description>&lt;p&gt;It is nice of you to post this.I will pay more attention on it.
&lt;a href="http://www.bagsupplyer.com/G-star-n754/" rel="nofollow"&gt;Fashion brand Men G-star Short jeans from China for wholesale at on line store&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 10 Sep 2011 23:08:42 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e6ab12c8-f387-4a9e-b242-873521d38372</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-139162</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by christian louboutin shoes on sale</title>
      <description>&lt;p&gt;Have the &lt;a href="http://www.blacklouboutinshoes.com/pumps-c-2.html" rel="nofollow"&gt;christian louboutin patent leather pumps&lt;/a&gt;  is a happy thing. 
Here have the most complete kinds of  &lt;a href="http://www.blacklouboutinshoes.com/platforms-c-3.html" rel="nofollow"&gt;christian louboutin leather platform pumps&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 02 Jun 2011 23:07:29 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d39583b4-d675-4908-9bc0-d5b185024963</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-107420</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by okey oyunu oyna </title>
      <description>&lt;p&gt;nice..&lt;/p&gt;


	&lt;p&gt;Okey oynamak hi&#231; bu kadar zevkli olmadi. Online ve 3 boyutlu &lt;a href="http://www.okeyoyunu-oyna.com" rel="nofollow"&gt;okey oyunu oyna&lt;/a&gt; ve turnuvalara sende katil.&lt;/p&gt;</description>
      <pubDate>Mon, 25 Apr 2011 15:13:54 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:59910503-83ee-4828-87fe-ad153f3de290</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-90549</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by Gaylene Mortell</title>
      <description>&lt;p&gt;Intimately, the article is in reality the freshest on that valuable topic. I match in with your conclusions and also definitely will eagerly look forward to your coming updates. Simply saying thanks cannot just be adequate, for the extraordinary lucidity in your writing. I can right away grab your rss feed to stay abreast of any updates. De lightful work and also much success in your business endeavors!&lt;/p&gt;</description>
      <pubDate>Tue, 19 Apr 2011 04:46:21 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:405d7850-918b-47ca-b7b1-a3615f0247f5</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-87177</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by Tenant Screening</title>
      <description>&lt;p&gt;These non-unit tests are the thing that boost your coverage of old code. That is also a good effect, because it is the goal of the system test to ensure that the parts work together.&lt;/p&gt;</description>
      <pubDate>Tue, 22 Feb 2011 10:59:53 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:03afcb0d-c51f-4f4f-b98f-c85bfd82386e</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-65687</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by Criminal Records</title>
      <description>&lt;p&gt;These non-unit tests are the thing that boost your coverage of old code. That is also a good effect, because it is the goal of the system test to ensure that the parts work together.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Feb 2011 11:53:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7c14dc3c-33cd-461d-a255-c0d28091962b</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-64243</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by replica watch rado</title>
      <description>&lt;p&gt;iPod to iTunes Transfer, transfer iPod to iTunes library, is an all-function transfer for iPod users that supports all versions of iPod and other iPhone devices. It can perform like a transfer, a converter, a ringmaker.&lt;/p&gt;</description>
      <pubDate>Mon, 03 Jan 2011 00:42:26 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:76778c14-aa04-416c-bb28-c734a9b09eec</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-53494</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by iPod to iTunes Transfer </title>
      <description>&lt;p&gt;iPod to iTunes Transfer, transfer iPod to iTunes library, is an all-function transfer for iPod users that supports all versions of iPod and other iPhone devices. It can perform like a transfer, a converter, a ringmaker.&lt;/p&gt;</description>
      <pubDate>Mon, 15 Nov 2010 19:58:42 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:35d68acc-6341-4814-9cd1-ed730d577dcb</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-40649</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by best blu ray converter</title>
      <description>&lt;p&gt;&lt;a href="http://www.bestblurayconverter.com" rel="nofollow"&gt;Blu Ray Converter&lt;/a&gt; can easily convert blu ray dvd/common dvd/DVD IFO file/DVD folder/DVD ISO file to most common Video, HD Video, Flash Video, iPod, iPhone, iPad, Apple TV, PSP/PS3, Creative Zen, BlackBerry, Zune, Xbox, Mobile Devices, Archos, Common Audio, Supported Portable Devices.&lt;/p&gt;


	&lt;p&gt;Editing funcionts like trim and crop DVD/ Blu-Ray clips, customize profile list and different watermarks?&lt;/p&gt;</description>
      <pubDate>Thu, 09 Sep 2010 03:51:10 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c77ebd3e-9cbe-4127-8fda-de934aeea3cd</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-25130</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by liding rode</title>
      <description>&lt;p&gt;OK, I got it. Thanks for your sharing. That is very interesting Smile I love reading and I am always searching for informative information like this.&lt;/p&gt;</description>
      <pubDate>Tue, 20 Jul 2010 02:26:54 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:bc58b58f-182e-4576-bb48-6e7f2237c901</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-16921</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by Tim</title>
      <description>&lt;p&gt;Of course.  But even then, your test shouldn&amp;#8217;t change the total coverage percentage by much.  It matters more than it shows, which is my problem with coverage in general.&lt;/p&gt;


	&lt;p&gt;You can show progress by bumping up the coverage number, but your tests don&amp;#8217;t have to be any good.  But if you write good tests where they&amp;#8217;re needed (as given by Lindsay) then you have the real goal covered, but the prosthetic goal is largely untouched.&lt;/p&gt;


	&lt;p&gt;Coverage grows very slowly in legacy code.&lt;/p&gt;</description>
      <pubDate>Mon, 06 Aug 2007 10:32:35 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c0ba4018-f756-4da7-b88d-2d5b89663dcc</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-588</link>
    </item>
    <item>
      <title>"Unit Tests Coverage: Less Is More" by Lindsay</title>
      <description>&lt;p&gt;Of course in a Test Driven Context, the first stage in fixing a bug is writing a test to expose it, so you should end up with some coverage of old code.&lt;/p&gt;</description>
      <pubDate>Mon, 06 Aug 2007 07:44:31 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4a8da19c-67c1-4b6e-8990-d88b21b56010</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/07/unit-tests-coverage-less-is-more#comment-585</link>
    </item>
  </channel>
</rss>

