<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Where&#039;s Walden? &#187; reftest</title>
	<atom:link href="http://whereswalden.com/tag/reftest/feed/" rel="self" type="application/rss+xml" />
	<link>http://whereswalden.com</link>
	<description>Mozilla, politics, economics, law, backpacking, cycling, and other random desiderata</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:17:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Public service announcement: name test files descriptively, not just with bug numbers</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/</link>
		<comments>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 02:41:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[psa]]></category>
		<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[reftest]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://whereswalden.com/?p=911</guid>
		<description><![CDATA[Mozilla&#8217;s tests are spread through a large number of directories. One of these directories, layout/reftests/bugs, contains a thousand or so reftests. Each reftest file is named by the number of the corresponding bug: for example, 169749-1.html and 169749-1-ref.html. This name-the-test-by-the-bug pattern is not specific to this particular directory, and if you skim through the directories [...]]]></description>
			<content:encoded><![CDATA[<p>Mozilla&#8217;s tests are spread through a large number of directories.  One of these directories, <a href="http://mxr.mozilla.org/mozilla-central/source/layout/reftests/bugs/"><code>layout/reftests/bugs</code></a>, contains a thousand or so reftests.  Each reftest file is named by the number of the corresponding bug: for example, <a href="http://mxr.mozilla.org/mozilla-central/source/layout/reftests/bugs/169749-1.html?force=1"><code>169749-1.html</code></a> and <a href="http://mxr.mozilla.org/mozilla-central/source/layout/reftests/bugs/169749-1-ref.html?force=1"><code>169749-1-ref.html</code></a>.  This name-the-test-by-the-bug pattern is not specific to this particular directory, and if you skim through the directories in <a href="http://mxr.mozilla.org/mozilla-central/source/layout/reftests/"><code>layout/reftests</code></a> you&#8217;ll find numerous other tests named this way.</p>
<p>The problem?  These names are effectively useless for determining the extent of test coverage.  (Assume <span lang="la">arguendo</span> that all these files were properly located in directories specific to a feature being tested, for example in a hypothetical <code>layout/reftests/list-item</code> directory for the two aforementioned tests, to make it reasonable to scan the coverage of a particular feature.)  If I want to know what corner cases are being tested, I have to read each test and corresponding bug individually, a tedious task.</p>
<p>The solution?  Name your test files descriptively.  For example, in the above case, a better name might perhaps be <code>marker-position-for-list-item-containing-block-with-margins.html</code>.</p>
<p>Okay, this will make it easier for random readers at unknown points in the future, but is there anything in it for you, the test author?  There is: you may endear yourself to reviewers.  For example, <a href="http://dbaron.org/">dbaron</a> decided, based upon the names I gave to test files in the recent patch I wrote to implement <code>background-size</code> (and upon a handful of comments in the list of tests itself), <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=189519#c25">that my patch&#8217;s tests were adequate</a> and didn&#8217;t need a long, tedious review of each one:</p>
<blockquote><pre>
The reftest.list looks good based on the names of the tests and the
comments; I don't see the need to review the tests themselves.
</pre>
</blockquote>
<p>In conclusion: <strong>DON&#8217;T</strong> name your test files based upon bug numbers, and <strong>DO</strong> name them based upon the particular scenario that they test.  Readers will and reviewers may thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

