<?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: Introducing Lithium, a testcase reduction tool</title>
	<atom:link href="http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/</link>
	<description>Jesse Ruderman on Firefox, security, and more</description>
	<lastBuildDate>Fri, 02 Mar 2012 12:46:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: James Napolitano</title>
		<link>http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/comment-page-1/#comment-3974</link>
		<dc:creator>James Napolitano</dc:creator>
		<pubDate>Fri, 28 Sep 2007 12:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/#comment-3974</guid>
		<description><![CDATA[OK.  I&#039;ve done some clean up, some testing, and fixed a bug, and the result is here: &lt;a href=&quot;http://www.geocities.com/james_napolitano/TestcaseBookmarklets.html&quot; rel=&quot;nofollow&quot;&gt;http://www.geocities.com/james_napolitano/TestcaseBookmarklets.html&lt;/a&gt;.  This was my javascript-learning exercise from 3 years ago.  I used many of your bookmarklets as a model.  Let me know what you think.]]></description>
		<content:encoded><![CDATA[<p>OK.  I&#8217;ve done some clean up, some testing, and fixed a bug, and the result is here: <a href="http://www.geocities.com/james_napolitano/TestcaseBookmarklets.html" rel="nofollow">http://www.geocities.com/james_napolitano/TestcaseBookmarklets.html</a>.  This was my javascript-learning exercise from 3 years ago.  I used many of your bookmarklets as a model.  Let me know what you think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Napolitano</title>
		<link>http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/comment-page-1/#comment-3929</link>
		<dc:creator>James Napolitano</dc:creator>
		<pubDate>Sun, 23 Sep 2007 01:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/#comment-3929</guid>
		<description><![CDATA[Let me check if they still work first...]]></description>
		<content:encoded><![CDATA[<p>Let me check if they still work first&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Ruderman</title>
		<link>http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/comment-page-1/#comment-3920</link>
		<dc:creator>Jesse Ruderman</dc:creator>
		<pubDate>Sat, 22 Sep 2007 08:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/#comment-3920</guid>
		<description><![CDATA[&lt;blockquote&gt;I assume though that this only works for bugs where you can programmatically determine if the bug is still present (i.e. crashes, assertions, warnings), as opposed to visual bugs like “this widget is 1px too wide”.&lt;/blockquote&gt;

Pretty much.  Note that if you can detect the bug from JavaScript, you can have the JavaScript output &quot;FAIL&quot; and have Lithium reduce based on that.  For example, you can detect incremental layout bugs from JavaScript if they cause an element&#039;s height to change when it shouldn&#039;t change.  I used this trick to reduce bug 368621 with Lithium.

&lt;blockquote&gt;A while ago, I came out with some javascript bookmarklets that were able to help quickly make a reduced testcase by stripping out parts of a webpage quickly that were unrelated to the bug in question. Would these be of any use now, for bugs where you couldn’t programmatically determine if the bug were still present?&lt;/blockquote&gt;

Yes, they would probably still be useful.  I bet they work better than using Lithium with an &quot;interestingness test&quot; that waits for you to press &#039;y&#039; or &#039;n&#039; each time :)  Where can I find them?]]></description>
		<content:encoded><![CDATA[<blockquote><p>I assume though that this only works for bugs where you can programmatically determine if the bug is still present (i.e. crashes, assertions, warnings), as opposed to visual bugs like “this widget is 1px too wide”.</p></blockquote>
<p>Pretty much.  Note that if you can detect the bug from JavaScript, you can have the JavaScript output &#8220;FAIL&#8221; and have Lithium reduce based on that.  For example, you can detect incremental layout bugs from JavaScript if they cause an element&#8217;s height to change when it shouldn&#8217;t change.  I used this trick to reduce bug 368621 with Lithium.</p>
<blockquote><p>A while ago, I came out with some javascript bookmarklets that were able to help quickly make a reduced testcase by stripping out parts of a webpage quickly that were unrelated to the bug in question. Would these be of any use now, for bugs where you couldn’t programmatically determine if the bug were still present?</p></blockquote>
<p>Yes, they would probably still be useful.  I bet they work better than using Lithium with an &#8220;interestingness test&#8221; that waits for you to press &#8216;y&#8217; or &#8216;n&#8217; each time :)  Where can I find them?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Napolitano</title>
		<link>http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/comment-page-1/#comment-3919</link>
		<dc:creator>James Napolitano</dc:creator>
		<pubDate>Sat, 22 Sep 2007 06:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/#comment-3919</guid>
		<description><![CDATA[Sounds awesome.  I assume though that this only works for bugs where you can programmatically determine  if the bug is still present (i.e. crashes, assertions, warnings), as opposed to visual bugs like &quot;this widget is 1px too wide&quot;.  Maybe you could hook it up to a fuzzer so that your PC automatically generates crashing testcases and reduces them in an endless cycle while its idle.  It could even submit a bug report to bugzilla via email, complete with reduced testcase and breakpad crash id!

I know you came out with jsfunfuzz to fuzz test javascript, but does Mozilla have fuzzers for html, css, xul, etc?  I&#039;ve seen and used iexploder, but it doesn&#039;t look like it was mature or actively worked on.  It certainly could be expanded.

A while ago, I came out with some javascript bookmarklets that were able to help quickly make a reduced testcase by stripping out parts of a webpage quickly that were unrelated to the bug in question.  Would these be of any use now, for bugs where you couldn&#039;t programmatically determine if the bug were still present?]]></description>
		<content:encoded><![CDATA[<p>Sounds awesome.  I assume though that this only works for bugs where you can programmatically determine  if the bug is still present (i.e. crashes, assertions, warnings), as opposed to visual bugs like &#8220;this widget is 1px too wide&#8221;.  Maybe you could hook it up to a fuzzer so that your PC automatically generates crashing testcases and reduces them in an endless cycle while its idle.  It could even submit a bug report to bugzilla via email, complete with reduced testcase and breakpad crash id!</p>
<p>I know you came out with jsfunfuzz to fuzz test javascript, but does Mozilla have fuzzers for html, css, xul, etc?  I&#8217;ve seen and used iexploder, but it doesn&#8217;t look like it was mature or actively worked on.  It certainly could be expanded.</p>
<p>A while ago, I came out with some javascript bookmarklets that were able to help quickly make a reduced testcase by stripping out parts of a webpage quickly that were unrelated to the bug in question.  Would these be of any use now, for bugs where you couldn&#8217;t programmatically determine if the bug were still present?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik</title>
		<link>http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/comment-page-1/#comment-3855</link>
		<dc:creator>Fredrik</dc:creator>
		<pubDate>Sat, 15 Sep 2007 09:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/15/introducing-lithium-a-testcase-reduction-tool/#comment-3855</guid>
		<description><![CDATA[Check out the optparse module for parsing options (successor to getopt). It has a lot of flexibility and you could either use an append action for program/args options (meaning each occurrence is appended to a list) or define callbacks to set up your own objects, if necessary.

With the append action these arguments:

./lithium.py -p ../fx2/firefox -a &quot;-P fx2&quot; - p ../trunk/firefox -a &quot;-P fxtrunk&quot;

(as much of a PITA they are to write) would result in a dict like this

{&#039;p&#039; : [&quot;../fx2/firefox&quot;, &quot;../trunk/firefox&quot;], &#039;a&#039; : [&quot;-P fx2&quot;, &quot;-P fxtrunk&quot;]}

Of course, using a YAML file or whatever for config, and having each test check for a .cfg file with the same name as the test file is a neat solution too. Avoiding typing is a good thing.

Having each test importing Lithium is probably easier (may require refactoring a bit, wrapping things up in a Lithium object). Although if you want some sort of automation later on, the reverse may be beneficial. Or adapting things in some way to fit into PyUnit or twisted.trial or whatever.]]></description>
		<content:encoded><![CDATA[<p>Check out the optparse module for parsing options (successor to getopt). It has a lot of flexibility and you could either use an append action for program/args options (meaning each occurrence is appended to a list) or define callbacks to set up your own objects, if necessary.</p>
<p>With the append action these arguments:</p>
<p>./lithium.py -p ../fx2/firefox -a &#8220;-P fx2&#8243; &#8211; p ../trunk/firefox -a &#8220;-P fxtrunk&#8221;</p>
<p>(as much of a PITA they are to write) would result in a dict like this</p>
<p>{&#8216;p&#8217; : ["../fx2/firefox", "../trunk/firefox"], &#8216;a&#8217; : ["-P fx2", "-P fxtrunk"]}</p>
<p>Of course, using a YAML file or whatever for config, and having each test check for a .cfg file with the same name as the test file is a neat solution too. Avoiding typing is a good thing.</p>
<p>Having each test importing Lithium is probably easier (may require refactoring a bit, wrapping things up in a Lithium object). Although if you want some sort of automation later on, the reverse may be beneficial. Or adapting things in some way to fit into PyUnit or twisted.trial or whatever.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
