<?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"
	>
<channel>
	<title>Comments on: A Case for Automated Testing</title>
	<atom:link href="http://blog.tmorris.net/a-case-for-automated-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tmorris.net/a-case-for-automated-testing/</link>
	<description>The weblog of Tony Morris</description>
	<pubDate>Sat, 19 May 2012 02:25:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/a-case-for-automated-testing/#comment-2322</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Sun, 08 Jun 2008 20:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/a-case-for-automated-testing/#comment-2322</guid>
		<description>Hi Ricky,
Sorry for my delayed response, your comment escaped my attention.

Yes, Reductio will generate implementations of an interface (or a class), however, there is often a small amount of work to do on your behalf. You might even consider this work to be "boiler-plate" since it is so systematic and requires no thinking. Ultimately, you will require an Arbitrary&#38;lt;T&#38;gt; where T  is your interface or class.

Classes can be shown to be convertible to/from zero or more transformations and since Reductio can construct arbitrary transformations (see &lt;code&gt;reductio.Arbitrary.arbF&lt;/code&gt;), then it is simply a matter of converting them to the appropriate class, type using the overloaded &lt;code&gt;Gen.bind&lt;/code&gt; method, which allows up to 8 transformations, however, if more are required, then they can be written using the &lt;code&gt;Gen.apply&lt;/code&gt; method. That is to say the overload of &lt;code&gt;Gen.bind&lt;/code&gt; that accepts N transformations can be written quite easily using the &lt;code&gt;Gen.bind&lt;/code&gt; for N-1 transformations plus apply. I understand that this might sound complicated, but it's really easy to do; perhaps a future tutorial ;)

PS: Thanks to the others who corrected my mistake.</description>
		<content:encoded><![CDATA[<p>Hi Ricky,<br />
Sorry for my delayed response, your comment escaped my attention.</p>
<p>Yes, Reductio will generate implementations of an interface (or a class), however, there is often a small amount of work to do on your behalf. You might even consider this work to be &#8220;boiler-plate&#8221; since it is so systematic and requires no thinking. Ultimately, you will require an Arbitrary&#38;lt;T&#38;gt; where T  is your interface or class.</p>
<p>Classes can be shown to be convertible to/from zero or more transformations and since Reductio can construct arbitrary transformations (see <code>reductio.Arbitrary.arbF</code>), then it is simply a matter of converting them to the appropriate class, type using the overloaded <code>Gen.bind</code> method, which allows up to 8 transformations, however, if more are required, then they can be written using the <code>Gen.apply</code> method. That is to say the overload of <code>Gen.bind</code> that accepts N transformations can be written quite easily using the <code>Gen.bind</code> for N-1 transformations plus apply. I understand that this might sound complicated, but it&#8217;s really easy to do; perhaps a future tutorial <img src='http://blog.tmorris.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
PS: Thanks to the others who corrected my mistake.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://blog.tmorris.net/a-case-for-automated-testing/#comment-2321</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Fri, 06 Jun 2008 17:03:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/a-case-for-automated-testing/#comment-2321</guid>
		<description>You probably want:

   addThenSubtract(a, -a)</description>
		<content:encoded><![CDATA[<p>You probably want:</p>
<p>   addThenSubtract(a, -a)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://blog.tmorris.net/a-case-for-automated-testing/#comment-2320</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Fri, 06 Jun 2008 16:13:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/a-case-for-automated-testing/#comment-2320</guid>
		<description>Your first example doesn't really work, you shouldn't be getting -7 back, you'd be getting.. the product of the two ints minus 7.., so 1 and 1 would return -5.

Plus, really, your unit tests should be testing for different return values, it's pretty pointless if you do 100 tests for the same return value.

I agree though, testing is important and automating testing is important. There should also be separation of unit tests like these and actual blackbox testing that is also automated. Yes, I think developers should do their own blackbox testing during a build cycle(hopefully continuous)</description>
		<content:encoded><![CDATA[<p>Your first example doesn&#8217;t really work, you shouldn&#8217;t be getting -7 back, you&#8217;d be getting.. the product of the two ints minus 7.., so 1 and 1 would return -5.</p>
<p>Plus, really, your unit tests should be testing for different return values, it&#8217;s pretty pointless if you do 100 tests for the same return value.</p>
<p>I agree though, testing is important and automating testing is important. There should also be separation of unit tests like these and actual blackbox testing that is also automated. Yes, I think developers should do their own blackbox testing during a build cycle(hopefully continuous)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a</title>
		<link>http://blog.tmorris.net/a-case-for-automated-testing/#comment-2319</link>
		<dc:creator>a</dc:creator>
		<pubDate>Fri, 06 Jun 2008 15:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/a-case-for-automated-testing/#comment-2319</guid>
		<description>Cute, but largely academic.  Could you illustrate this at a bigger scale, where you are trying to tests objects (not primitive types) and in integration scenarios too (database access, remote calls, GUI, etc...).

To make things concrete:  how could I verify that a certain row has been inserted in the database after I update an object?</description>
		<content:encoded><![CDATA[<p>Cute, but largely academic.  Could you illustrate this at a bigger scale, where you are trying to tests objects (not primitive types) and in integration scenarios too (database access, remote calls, GUI, etc&#8230;).</p>
<p>To make things concrete:  how could I verify that a certain row has been inserted in the database after I update an object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Strazzere</title>
		<link>http://blog.tmorris.net/a-case-for-automated-testing/#comment-2318</link>
		<dc:creator>Joe Strazzere</dc:creator>
		<pubDate>Fri, 06 Jun 2008 14:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/a-case-for-automated-testing/#comment-2318</guid>
		<description>"int addThenSubtractSeven(int x, int y) {
  return x + y - 7;
}

...

For example, when x and y are the same value, you will always get back -7."

Are you sure?

Automated tests are interesting, but they are just code.  Sometimes bad code.</description>
		<content:encoded><![CDATA[<p>&#8220;int addThenSubtractSeven(int x, int y) {<br />
  return x + y - 7;<br />
}</p>
<p>&#8230;</p>
<p>For example, when x and y are the same value, you will always get back -7.&#8221;</p>
<p>Are you sure?</p>
<p>Automated tests are interesting, but they are just code.  Sometimes bad code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://blog.tmorris.net/a-case-for-automated-testing/#comment-2317</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Fri, 06 Jun 2008 12:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/a-case-for-automated-testing/#comment-2317</guid>
		<description>I didn't quite grasp the section about mocking.  Do you mean to say that I can hand Reductio MyCleverInterface.class and it will find/construct implementations of it?  You said "you just pass in the arbitrary generator (Reductio provides them of course)", which leads me to think you mean that.

Also, I think you could pick an example that is easier to identify with for programmers, though I personally found a + b - b == a quite good fun with students (especially where a is a float).</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t quite grasp the section about mocking.  Do you mean to say that I can hand Reductio MyCleverInterface.class and it will find/construct implementations of it?  You said &#8220;you just pass in the arbitrary generator (Reductio provides them of course)&#8221;, which leads me to think you mean that.</p>
<p>Also, I think you could pick an example that is easier to identify with for programmers, though I personally found a + b - b == a quite good fun with students (especially where a is a float).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

