<?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: Public service announcement: name test files descriptively, not just with bug numbers</title>
	<atom:link href="http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/feed/" rel="self" type="application/rss+xml" />
	<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/</link>
	<description>Mozilla, politics, economics, law, backpacking, cycling, and other random desiderata</description>
	<lastBuildDate>Tue, 31 Jan 2012 01:00:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: David Baron</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136050</link>
		<dc:creator>David Baron</dc:creator>
		<pubDate>Sun, 09 Aug 2009 17:43:04 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136050</guid>
		<description>I think one practices is right in some cases, and the other in others.

In particular, if you&#039;re trying to write a thorough set of tests for a feature, use descriptive names.

But if you&#039;re landing a testcase for a particular bug that&#039;s not part of a set of thorough tests, just to make sure that one particular case doesn&#039;t regress, use the bug number, since a &quot;named&quot; test could mislead people into thinking whatever was described by that test name was actually being tested adequately.

[In the latter case it seems to me an appropriate amount of vagueness is in order.  :-)  Enough of a hint from the name will point the way for someone interested in determining whether something&#039;s been tested, even if it doesn&#039;t identify exactly what&#039;s being tested.  Having a handful of files with plausible names is better than having the same handful with just numbers to go by.]</description>
		<content:encoded><![CDATA[<p>I think one practices is right in some cases, and the other in others.</p>
<p>In particular, if you&#8217;re trying to write a thorough set of tests for a feature, use descriptive names.</p>
<p>But if you&#8217;re landing a testcase for a particular bug that&#8217;s not part of a set of thorough tests, just to make sure that one particular case doesn&#8217;t regress, use the bug number, since a &#8220;named&#8221; test could mislead people into thinking whatever was described by that test name was actually being tested adequately.</p>
<p>[In the latter case it seems to me an appropriate amount of vagueness is in order.  <img src='http://whereswalden.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   Enough of a hint from the name will point the way for someone interested in determining whether something's been tested, even if it doesn't identify exactly what's being tested.  Having a handful of files with plausible names is better than having the same handful with just numbers to go by.]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136048</link>
		<dc:creator>Boris</dc:creator>
		<pubDate>Sun, 09 Aug 2009 17:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136048</guid>
		<description>Having &quot;what the test tests&quot; in the name doesn&#039;t help that much with coverage either, necessarily... and it not feasible anyway for tests that test more than one thing (most of them, actually).  Using a non-numbered name also means you have to figure out _where_ to put the test, unless you think we should dump random non-numbered names into bugs/.

Having the bug# is nice just in terms of figuring out whether a particular bug has a test (since some people aren&#039;t so good at setting in-testsuite flags).

It&#039;s also nice in terms of figuring out what the test is _trying_ to test, if you discover that the test is bogus in the course of working on some patch (happens reasonably often, sadly).

In the end, neither one provides all the metadata one wants for a test, but putting all that metadata into the test increases the test-writing burden tremendously.  Not sure there are any good solutions here.</description>
		<content:encoded><![CDATA[<p>Having &#8220;what the test tests&#8221; in the name doesn&#8217;t help that much with coverage either, necessarily&#8230; and it not feasible anyway for tests that test more than one thing (most of them, actually).  Using a non-numbered name also means you have to figure out _where_ to put the test, unless you think we should dump random non-numbered names into bugs/.</p>
<p>Having the bug# is nice just in terms of figuring out whether a particular bug has a test (since some people aren&#8217;t so good at setting in-testsuite flags).</p>
<p>It&#8217;s also nice in terms of figuring out what the test is _trying_ to test, if you discover that the test is bogus in the course of working on some patch (happens reasonably often, sadly).</p>
<p>In the end, neither one provides all the metadata one wants for a test, but putting all that metadata into the test increases the test-writing burden tremendously.  Not sure there are any good solutions here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Kaiser</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136046</link>
		<dc:creator>Robert Kaiser</dc:creator>
		<pubDate>Sun, 09 Aug 2009 13:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136046</guid>
		<description>A descriptive name is helpful also in case of determining what a failure might be about, but a bug number is _very_ helpful in speedily finding the history of what a test was introduced for - IMHO, both should be in there, but too long filenames should also be avoided as I think they still give headaches with some filesystems (e.g. possibly FAT32).

[Last I recall, FAT32 didn&#039;t have problems with pretty generous path lengths, but I might be mistaken.]</description>
		<content:encoded><![CDATA[<p>A descriptive name is helpful also in case of determining what a failure might be about, but a bug number is _very_ helpful in speedily finding the history of what a test was introduced for &#8211; IMHO, both should be in there, but too long filenames should also be avoided as I think they still give headaches with some filesystems (e.g. possibly FAT32).</p>
<p>[Last I recall, FAT32 didn't have problems with pretty generous path lengths, but I might be mistaken.]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bc</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136017</link>
		<dc:creator>bc</dc:creator>
		<pubDate>Sat, 08 Aug 2009 09:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136017</guid>
		<description>I agree with Adam that retaining the bug number in the test file name is good practice. Coming up with a common format for bug number and test description in the test file name is also important. Consider the use case of taking a list of tests and determining the list of bugs where the tests were created. As long as you keep that simple, adding more descriptive text to the file name is fine.</description>
		<content:encoded><![CDATA[<p>I agree with Adam that retaining the bug number in the test file name is good practice. Coming up with a common format for bug number and test description in the test file name is also important. Consider the use case of taking a list of tests and determining the list of bugs where the tests were created. As long as you keep that simple, adding more descriptive text to the file name is fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mossop</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136016</link>
		<dc:creator>Mossop</dc:creator>
		<pubDate>Sat, 08 Aug 2009 09:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136016</guid>
		<description>I&#039;ve seen long-named tests in the tree and they&#039;ve bugged me everytime because it is harder to identify the test in the list (because frequently in the directory view the end is chopped off) and even then they tend to be pretty obscure because they try to keep the length shorter.

Also I really hope we aren&#039;t judging whether we have good test coverage on things based on the naming alone.

Instead I&#039;d be more inclined to have a README or something in the directory that includes a short description of what each test covers.

[No serious judgment, but it&#039;s great for a birds-eye view.  A README could work, particularly since MXR might display it (or only some of it?), but that requires some duplication of information.  (Comments in the test itself, I expect, would be less duplicative because they are likely to be more of an explanatory flavor than a descriptive flavor.)]</description>
		<content:encoded><![CDATA[<p>I&#8217;ve seen long-named tests in the tree and they&#8217;ve bugged me everytime because it is harder to identify the test in the list (because frequently in the directory view the end is chopped off) and even then they tend to be pretty obscure because they try to keep the length shorter.</p>
<p>Also I really hope we aren&#8217;t judging whether we have good test coverage on things based on the naming alone.</p>
<p>Instead I&#8217;d be more inclined to have a README or something in the directory that includes a short description of what each test covers.</p>
<p>[No serious judgment, but it's great for a birds-eye view.  A README could work, particularly since MXR might display it (or only some of it?), but that requires some duplication of information.  (Comments in the test itself, I expect, would be less duplicative because they are likely to be more of an explanatory flavor than a descriptive flavor.)]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mnandigama</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136010</link>
		<dc:creator>mnandigama</dc:creator>
		<pubDate>Sat, 08 Aug 2009 06:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136010</guid>
		<description>I concur with your reply. But at the end of the day, one way or the other, we should be able to understand the purpose of the test with out reading the entire test code for each test case. Be it annotations or descriptive names.</description>
		<content:encoded><![CDATA[<p>I concur with your reply. But at the end of the day, one way or the other, we should be able to understand the purpose of the test with out reading the entire test code for each test case. Be it annotations or descriptive names.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mnandigama</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136009</link>
		<dc:creator>mnandigama</dc:creator>
		<pubDate>Sat, 08 Aug 2009 06:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136009</guid>
		<description>I respectfully disagree with your suggestion. The test case functionality has to be annotated in the test case in the form of a comment instead of trying to cram it into the test case name itself. Consider testing scenarios where we end up with very deep nested directory structures coupled with long test names and end up failing running tests because of a long path problem. A test case name having a bug in it serves a specific purpose. It acts as a regression test case. If a bug number named test case fails , we know that it is causing a regression just by looking at the list of failed tests log. 

Naming test to indicate the purpose and annotating the bug for which the test case is written inside or vice-versa serves same functional purpose if suitable parsers are written to grep for annotations or test case names. However, bug numbered tests provide shorter path lengths while executing tests for fennec, just for example.

[I&#039;m not suggesting it be described exclusively by the test name; a comment in the test is also well worth doing.  Further, as Adam notes, description and number are not exclusive.   By the way, you can&#039;t assume a test is a regression just because it&#039;s a number; I&#039;m sure I could point to many testcases named with numbers which are not themselves regressions.

I don&#039;t buy shorter path lengths as a valid goal.  I don&#039;t think we should hack around deficient platforms that don&#039;t support long paths by handicapping ourselves in the source tree.  If that&#039;s really a concern, there could be a renaming step included in the test-execution process to specifically address that platform.]</description>
		<content:encoded><![CDATA[<p>I respectfully disagree with your suggestion. The test case functionality has to be annotated in the test case in the form of a comment instead of trying to cram it into the test case name itself. Consider testing scenarios where we end up with very deep nested directory structures coupled with long test names and end up failing running tests because of a long path problem. A test case name having a bug in it serves a specific purpose. It acts as a regression test case. If a bug number named test case fails , we know that it is causing a regression just by looking at the list of failed tests log. </p>
<p>Naming test to indicate the purpose and annotating the bug for which the test case is written inside or vice-versa serves same functional purpose if suitable parsers are written to grep for annotations or test case names. However, bug numbered tests provide shorter path lengths while executing tests for fennec, just for example.</p>
<p>[I'm not suggesting it be described exclusively by the test name; a comment in the test is also well worth doing.  Further, as Adam notes, description and number are not exclusive.   By the way, you can't assume a test is a regression just because it's a number; I'm sure I could point to many testcases named with numbers which are not themselves regressions.</p>
<p>I don't buy shorter path lengths as a valid goal.  I don't think we should hack around deficient platforms that don't support long paths by handicapping ourselves in the source tree.  If that's really a concern, there could be a renaming step included in the test-execution process to specifically address that platform.]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Hauner</title>
		<link>http://whereswalden.com/2009/08/07/public-service-announcement-name-test-files-descriptively-not-just-with-bug-numbers/comment-page-1/#comment-136008</link>
		<dc:creator>Adam Hauner</dc:creator>
		<pubDate>Sat, 08 Aug 2009 06:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://whereswalden.com/?p=911#comment-136008</guid>
		<description>Is anything wrong with names combining both ways? For example:
169749-1-marker-position-for-list-item-containing-block-with-margins.html

[That seems reasonable.]</description>
		<content:encoded><![CDATA[<p>Is anything wrong with names combining both ways? For example:<br />
169749-1-marker-position-for-list-item-containing-block-with-margins.html</p>
<p>[That seems reasonable.]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

