<?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: Testing Agatha&#8217;s Caching Functionality With QuickNet</title>
	<atom:link href="http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Thu, 09 Sep 2010 13:37:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: New Year&#8217;s Resolutions &#124; The Inquisitive Coder &#8211; Davy Brion&#39;s Blog</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23330</link>
		<dc:creator>New Year&#8217;s Resolutions &#124; The Inquisitive Coder &#8211; Davy Brion&#39;s Blog</dc:creator>
		<pubDate>Sun, 27 Dec 2009 15:12:56 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23330</guid>
		<description>[...] Testing Agatha&#8217;s Caching Functionality With QuickNet [...]</description>
		<content:encoded><![CDATA[<p>[...] Testing Agatha&rsquo;s Caching Functionality With QuickNet [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kilfour</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23328</link>
		<dc:creator>kilfour</dc:creator>
		<pubDate>Sun, 27 Dec 2009 11:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23328</guid>
		<description>I just posted this on my blog as the formatting in these comments makes my eyes squint :

See http://kilfour.wordpress.com/2009/12/27/mr-bad-example/.</description>
		<content:encoded><![CDATA[<p>I just posted this on my blog as the formatting in these comments makes my eyes squint :</p>
<p>See <a href="http://kilfour.wordpress.com/2009/12/27/mr-bad-example/" rel="nofollow">http://kilfour.wordpress.com/2009/12/27/mr-bad-example/</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kilfour</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23327</link>
		<dc:creator>kilfour</dc:creator>
		<pubDate>Sun, 27 Dec 2009 11:43:01 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23327</guid>
		<description>&lt;code&gt;
public class UsingGenerator : AcidTest
{
    static BugHouse bugHouse;
    public override void Setup()
    {
        bugHouse = new BugHouse();
    }

    class BugRun : MetaTransition
    {
        public BugRun()
        {
            Generator = new IntGenerator(0, 20);
            Execute = input =&gt; bugHouse.Run(input);
        }
    }

    [SpecFor(typeof(BugRun))]
    public Spec ShrinksIrrelevantInput(int input, bool output)
    {
        return new Spec(() =&gt; Ensure.True(output));
    }
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code><br />
public class UsingGenerator : AcidTest<br />
{<br />
    static BugHouse bugHouse;<br />
    public override void Setup()<br />
    {<br />
        bugHouse = new BugHouse();<br />
    }</p>
<p>    class BugRun : MetaTransition<br />
    {<br />
        public BugRun()<br />
        {<br />
            Generator = new IntGenerator(0, 20);<br />
            Execute = input =&gt; bugHouse.Run(input);<br />
        }<br />
    }</p>
<p>    [SpecFor(typeof(BugRun))]<br />
    public Spec ShrinksIrrelevantInput(int input, bool output)<br />
    {<br />
        return new Spec(() =&gt; Ensure.True(output));<br />
    }<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ariel</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23326</link>
		<dc:creator>Ariel</dc:creator>
		<pubDate>Sun, 27 Dec 2009 08:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23326</guid>
		<description>Kilfour - 
can you show the test code for that acid test?
In other words - how much work did you need to put in to catch that bug?</description>
		<content:encoded><![CDATA[<p>Kilfour &#8211;<br />
can you show the test code for that acid test?<br />
In other words &#8211; how much work did you need to put in to catch that bug?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23321</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sat, 26 Dec 2009 11:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23321</guid>
		<description>@Garfield

it doesn&#039;t really create random tests... it uses randomly generated data (which as Mark said, you have full control over if you need/want it) to execute the transitions and verify the specs that you&#039;ve defined.  There&#039;s more to it because the previous sentence is quite an over-simplification but i just want to avoid any confusion with regards to creating random tests.</description>
		<content:encoded><![CDATA[<p>@Garfield</p>
<p>it doesn&#8217;t really create random tests&#8230; it uses randomly generated data (which as Mark said, you have full control over if you need/want it) to execute the transitions and verify the specs that you&#8217;ve defined.  There&#8217;s more to it because the previous sentence is quite an over-simplification but i just want to avoid any confusion with regards to creating random tests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kilfour</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23315</link>
		<dc:creator>kilfour</dc:creator>
		<pubDate>Fri, 25 Dec 2009 16:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23315</guid>
		<description>code and download : http://code.google.com/p/quicknet/

It&#039;s still a pretty young framework, in beta, and the upcoming next release allready contains a &#039;small&#039; breaking change (SetUp became Setup). I&#039;m trying to keep these things to an absolute minimum though. 
Documentation is not yet available, buth forthcoming in the very near future. Follow the links on google code for the blog and discussion group.


1. Yes, full control if you want, default generators are available if you don&#039;t need full control.
2. The framework reports the simplest failcase :

An acid test for this buggy class :

public class BugHouse
{
    private int count;
    public bool Run(int a)
    {
        if (count++ &gt;= 3 &amp;&amp; a == 6)
            throw new Exception();
        return true;
    }
}

returns the following console output :

------ Test started: Assembly: QuickNet.Example.dll ------

TestCase &#039;BugRun ShrinksIrrelevantInput&#039; failed: System.Exception : Exception of type &#039;System.Exception&#039; was thrown.
	D:\DotNetDev\QN\QuickNet.Example\SimpleTransitionShrinking.cs(16,0): at QuickNet.Example.BugHouse.Run(Int32 a)
	D:\DotNetDev\QN\QuickNet.Example\SimpleTransitionShrinking.cs(58,0): at QuickNet.Example.UsingGenerator.BugRun.b__3(Int32 input)
	D:\DotNetDev\QN\QuickNet\Transition.cs(55,0): at QuickNet.Transition`2.PerformTransition(TestRunReport report)

Output from BugRun ShrinksIrrelevantInput:
  ----------------------------------------------------------
  BugRun ShrinksIrrelevantInput
  Falsifiable after 1 test(s), 40 Transition(s).
  --------------------Simplest Fail Case--------------------
  Transition : BugRun, Output : True
  Transition : BugRun, Output : True
  Transition : BugRun, Output : True
  Transition : BugRun, Output : True
  6
  ----------------------------------------------------------

0 passed, 1 failed, 0 skipped, took 1,13 seconds.

This means that calling BugHouse.Run 3 times with any input and then once again with 6 as a parameter causes an exception.

&#039;Is it reproducable ?&#039; 
Once it hits a fail case, it will hit it again. You might have to tweak some values to get to the edge-cases more often. Currently it is not very debugger-friendly. You pretty much want to debug the simplest fail case and not the entire run, this is currently not possible. I&#039;m working on improving that.</description>
		<content:encoded><![CDATA[<p>code and download : <a href="http://code.google.com/p/quicknet/" rel="nofollow">http://code.google.com/p/quicknet/</a></p>
<p>It&#8217;s still a pretty young framework, in beta, and the upcoming next release allready contains a &#8216;small&#8217; breaking change (SetUp became Setup). I&#8217;m trying to keep these things to an absolute minimum though.<br />
Documentation is not yet available, buth forthcoming in the very near future. Follow the links on google code for the blog and discussion group.</p>
<p>1. Yes, full control if you want, default generators are available if you don&#8217;t need full control.<br />
2. The framework reports the simplest failcase :</p>
<p>An acid test for this buggy class :</p>
<p>public class BugHouse<br />
{<br />
    private int count;<br />
    public bool Run(int a)<br />
    {<br />
        if (count++ &gt;= 3 &amp;&amp; a == 6)<br />
            throw new Exception();<br />
        return true;<br />
    }<br />
}</p>
<p>returns the following console output :</p>
<p>&#8212;&#8212; Test started: Assembly: QuickNet.Example.dll &#8212;&#8212;</p>
<p>TestCase &#8216;BugRun ShrinksIrrelevantInput&#8217; failed: System.Exception : Exception of type &#8216;System.Exception&#8217; was thrown.<br />
	D:\DotNetDev\QN\QuickNet.Example\SimpleTransitionShrinking.cs(16,0): at QuickNet.Example.BugHouse.Run(Int32 a)<br />
	D:\DotNetDev\QN\QuickNet.Example\SimpleTransitionShrinking.cs(58,0): at QuickNet.Example.UsingGenerator.BugRun.b__3(Int32 input)<br />
	D:\DotNetDev\QN\QuickNet\Transition.cs(55,0): at QuickNet.Transition`2.PerformTransition(TestRunReport report)</p>
<p>Output from BugRun ShrinksIrrelevantInput:<br />
  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
  BugRun ShrinksIrrelevantInput<br />
  Falsifiable after 1 test(s), 40 Transition(s).<br />
  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;Simplest Fail Case&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
  Transition : BugRun, Output : True<br />
  Transition : BugRun, Output : True<br />
  Transition : BugRun, Output : True<br />
  Transition : BugRun, Output : True<br />
  6<br />
  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>0 passed, 1 failed, 0 skipped, took 1,13 seconds.</p>
<p>This means that calling BugHouse.Run 3 times with any input and then once again with 6 as a parameter causes an exception.</p>
<p>&#8216;Is it reproducable ?&#8217;<br />
Once it hits a fail case, it will hit it again. You might have to tweak some values to get to the edge-cases more often. Currently it is not very debugger-friendly. You pretty much want to debug the simplest fail case and not the entire run, this is currently not possible. I&#8217;m working on improving that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: garfield</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23313</link>
		<dc:creator>garfield</dc:creator>
		<pubDate>Fri, 25 Dec 2009 11:52:18 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23313</guid>
		<description>If I understand correctly, QuickNet is an infrastructure for random tests creation which is pretty cool, still I haven&#039;t managed to find any more material on it. can you direct me to some ? 
A couple of things I would like to know are :
1. Do I have any control on the random distribution of values ?
2. In case of failure what do I get ? what is the exception message ? Is it reproducable ?</description>
		<content:encoded><![CDATA[<p>If I understand correctly, QuickNet is an infrastructure for random tests creation which is pretty cool, still I haven&#8217;t managed to find any more material on it. can you direct me to some ?<br />
A couple of things I would like to know are :<br />
1. Do I have any control on the random distribution of values ?<br />
2. In case of failure what do I get ? what is the exception message ? Is it reproducable ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BDM</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23310</link>
		<dc:creator>BDM</dc:creator>
		<pubDate>Thu, 24 Dec 2009 09:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23310</guid>
		<description>Although I do not understand everything, I think I get the basic idea, and I can really see the potential. It seems like writing unit tests will be less repetitive, and the coverage will be higher... I&#039;m looking forward to using it!</description>
		<content:encoded><![CDATA[<p>Although I do not understand everything, I think I get the basic idea, and I can really see the potential. It seems like writing unit tests will be less repetitive, and the coverage will be higher&#8230; I&#8217;m looking forward to using it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Morning Brew - Chris Alcock &#187; The Morning Brew #505</title>
		<link>http://davybrion.com/blog/2009/12/testing-agathas-caching-functionality-with-quicknet/comment-page-1/#comment-23309</link>
		<dc:creator>The Morning Brew - Chris Alcock &#187; The Morning Brew #505</dc:creator>
		<pubDate>Thu, 24 Dec 2009 08:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2126#comment-23309</guid>
		<description>[...] Testing Agatha&#8217;s Caching Functionality With QuickNet - Davy Brion delves deeper into the tests he has written for Agatha&#8217;s caching layer which use QuickNet, along the way providing a good introduction to the capabilities of QuickNet and an understanding of how to use it. [...]</description>
		<content:encoded><![CDATA[<p>[...] Testing Agatha&#8217;s Caching Functionality With QuickNet &#8211; Davy Brion delves deeper into the tests he has written for Agatha&#8217;s caching layer which use QuickNet, along the way providing a good introduction to the capabilities of QuickNet and an understanding of how to use it. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
