Would this also mean that the guy writing the story is defining the functional part of the GUI?<div>Since it&#39;s the most outer layer of the system, would that be described in a story first?</div><div>Like: &quot;Given a user and a form with a button, when a user clicks the button, then the world should come to an end.&quot;
</div><div><br class="webkit-block-placeholder"></div><div>(I&#39;m waiting for a book to come out, describing all this very cool stuff.)</div><div><div><br><div class="gmail_quote">On Nov 6, 2007 10:34 PM, Jake Howerton &lt;
<a href="mailto:jake.howerton@gmail.com">jake.howerton@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">This makes me wonder if some sort of bug tracking system could be
<br>integrated into the browser story editor where testers/customers could<br>enter the passing and failing story.<br><br>Bug Scenario: bad addition to cart<br>&nbsp;Given user has two apples in cart<br><br>&nbsp;When user adds two apples to cart
<br><br>&nbsp;Then user has three apples in cart<br><br>Expected Scenario: proper addition to cart<br>&nbsp;Given user has two apples in cart<br><br>&nbsp;When user adds two apples to cart<br><br>&nbsp;Then user has four apples in cart<br><br>
When you fix the bug you can promote the expected scenario to a first<br>class scenario ( or merge it with the one that did not cover the bug<br>properly), &nbsp;and store the bug regression stories somewhere to ensure<br>they do not fail in the future.
<br><br>WDYT?<br><font color="#888888"><br>Jake<br></font><div><div></div><div class="Wj3C7c"><br>On Nov 6, 2007 4:25 PM, aslak hellesoy &lt;<a href="mailto:aslak.hellesoy@gmail.com">aslak.hellesoy@gmail.com</a>&gt; wrote:
<br>&gt; On Nov 6, 2007 7:39 PM, Alvin Schur &lt;<a href="mailto:a.schur@nucleus.com">a.schur@nucleus.com</a>&gt; wrote:<br>&gt; &gt; Are stories intended to mean &quot;it worked in one case&quot; to indicate a<br>&gt; &gt; feature is present instead of being an exhaustive description of how
<br>&gt; &gt; edge cases are handled?<br>&gt; &gt;<br>&gt;<br>&gt; Ideally, yes. You&#39;ll typically have one scenario for each edge case. A<br>&gt; story has many scenarios (which again have many steps - G/W/T)<br>&gt;<br>
&gt; Aslak<br>&gt;<br>&gt; &gt; Are stories supposed to be comprehensive enough to pass a rigorous<br>&gt; &gt; &quot;heckling&quot;?<br>&gt; &gt;<br>&gt; &gt; Thanks,<br>&gt; &gt;<br>&gt; &gt; Alvin.<br>&gt; &gt; &gt; ------------------------------
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Message: 9<br>&gt; &gt; &gt; Date: Tue, 6 Nov 2007 13:43:23 +0000<br>&gt; &gt; &gt; From: &quot;Dan North&quot; &lt;<a href="mailto:tastapod@gmail.com">tastapod@gmail.com</a>&gt;<br>&gt; &gt; &gt; Subject: Re: [rspec-devel] Stories vs. examples
<br>&gt; &gt; &gt; To: rspec-devel &lt;<a href="mailto:rspec-devel@rubyforge.org">rspec-devel@rubyforge.org</a>&gt;<br>&gt; &gt; &gt; Message-ID:<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:d559d8430711060543g5d8954fbu157afcc177e847a1@mail.gmail.com">
d559d8430711060543g5d8954fbu157afcc177e847a1@mail.gmail.com</a>&gt;<br>&gt; &gt; &gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>&gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Hi Ian.<br>&gt; &gt; &gt;<br>
&gt; &gt; &gt; I find it helps to think about the audience for your documentation. (It is<br>&gt; &gt; &gt; documentation after all, it just happens to run, which is rather nice.)<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; For the specs, the audience is developers. They want to know what an object
<br>&gt; &gt; &gt; of a particular type - or more specifically in a particular role - does,<br>&gt; &gt; &gt; which other objects it interacts with and why. This audience wants to see<br>&gt; &gt; &gt; progress without leaving their IDE or editor, which is why we put effort
<br>&gt; &gt; &gt; into making TextMate plugins and why we want to play nice with all the<br>&gt; &gt; &gt; Test::Unit runners.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; For the stories, the audience is testers, analysts and ultimately the
<br>&gt; &gt; &gt; various stakeholders who are requesting the features. They want to know what<br>&gt; &gt; &gt; the system does and how to interact with it to get work done. They don&#39;t<br>&gt; &gt; &gt; really care what happens under the hood. Typically they are non-technical
<br>&gt; &gt; &gt; (or less technical than developers) which is why we think there is so much<br>&gt; &gt; &gt; value in making their documentation look like documentation - just plain<br>&gt; &gt; &gt; words on a page. Even better, if you can give them green words on a page
<br>&gt; &gt; &gt; when the feature is implemented and working, or red words on a page when the<br>&gt; &gt; &gt; feature isn&#39;t working, or grey words for unimplemented features, they can<br>&gt; &gt; &gt; see progress in a living document. Now make that document editable, like a
<br>&gt; &gt; &gt; regular document, and you are well on your way to acceptance testing<br>&gt; &gt; &gt; Nirvana.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; So the process (described as &quot;outside in&quot; as opposed to &quot;top down&quot; or
<br>&gt; &gt; &gt; &quot;bottom up&quot;) starts by expressing a feature request as a story, driving out<br>&gt; &gt; &gt; the scenarios that define &quot;done&quot; for that story and automating the steps<br>&gt; &gt; &gt; that make up the scenarios. Then you use code-level examples to drive
<br>&gt; &gt; &gt; inwards (that word &quot;drive&quot; again) from the outermost objects that the steps<br>&gt; &gt; &gt; identified. All the time you want to implement just enough behaviour to get<br>&gt; &gt; &gt; the steps to work, to drive the scenarios. Then you&#39;re done and you go to
<br>&gt; &gt; &gt; the pub for a well-earned drink. Hence &quot;beer-driven development&quot;.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Hope that helps,<br>&gt; &gt; &gt; Dan<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; On 11/6/07, Ian Dees &lt;
<a href="mailto:undees@gmail.com">undees@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&gt; Hi, all.<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; I&#39;m posting a philosophical question here, rather than cluttering up
<br>&gt; &gt; &gt;&gt; the tracker for the patch where it originated.<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; Quoth David, in response to some fuzzy thinking on my part:<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Stories are not just another way to express examples - they&#39;re a<br>&gt; &gt; &gt;&gt;&gt;<br>&gt; &gt; &gt;&gt; completely different animal.<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; The offending clause of mine: &quot;stories are another way to write your
<br>&gt; &gt; &gt;&gt; tests.... examples are meant for small, targeted descriptions of your<br>&gt; &gt; &gt;&gt; code&#39;s behavior... stories are suited to longer, more detailed<br>&gt; &gt; &gt;&gt; narratives.&quot;
<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; The intent wasn&#39;t to say that stories are a different syntax for<br>&gt; &gt; &gt;&gt; examples; it was that stories and examples are two different syntaxes<br>&gt; &gt; &gt;&gt; for two different test-writing purposes. &nbsp;But now I&#39;m wondering if I
<br>&gt; &gt; &gt;&gt; even have _that_ right.<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; In Rails-land, the distinction is much clearer: you typically see<br>&gt; &gt; &gt;&gt; examples for testing code, and stories for testing applications (in
<br>&gt; &gt; &gt;&gt; the blog posts I&#39;ve read, anyway).<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; But in GUI-land, the picture blurs a great deal: you&#39;re always testing<br>&gt; &gt; &gt;&gt; applications, but sometimes you&#39;re giving a tiny example of how one
<br>&gt; &gt; &gt;&gt; feature works, and at other times you&#39;re writing a story about several<br>&gt; &gt; &gt;&gt; steps of an interaction between the customer and the UI.<br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt; Anyone want to jump into these muddy waters?
<br>&gt; &gt; &gt;&gt; _______________________________________________<br>&gt; &gt; &gt;&gt; rspec-devel mailing list<br>&gt; &gt; &gt;&gt; <a href="mailto:rspec-devel@rubyforge.org">rspec-devel@rubyforge.org</a><br>&gt; &gt; &gt;&gt; 
<a href="http://rubyforge.org/mailman/listinfo/rspec-devel" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-devel</a><br>&gt; &gt; &gt;&gt;<br>&gt; &gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt; _______________________________________________
<br>&gt; &gt; rspec-devel mailing list<br>&gt; &gt; <a href="mailto:rspec-devel@rubyforge.org">rspec-devel@rubyforge.org</a><br>&gt; &gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-devel" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-devel
</a><br>&gt; &gt;<br>&gt; _______________________________________________<br>&gt; rspec-devel mailing list<br>&gt; <a href="mailto:rspec-devel@rubyforge.org">rspec-devel@rubyforge.org</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-devel" target="_blank">
http://rubyforge.org/mailman/listinfo/rspec-devel</a><br>&gt;<br>_______________________________________________<br>rspec-devel mailing list<br><a href="mailto:rspec-devel@rubyforge.org">rspec-devel@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-devel" target="_blank">
http://rubyforge.org/mailman/listinfo/rspec-devel</a><br></div></div></blockquote></div><br></div></div>