<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael Dowling&#039;s Whispers &#187; Agile Testing, TDD, ATDD</title>
	<atom:link href="http://blog.minderupt.com/category/agile/agile-testing-tdd-atdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.minderupt.com</link>
	<description>Agile development, technology, management, and other such musings</description>
	<lastBuildDate>Thu, 27 May 2010 03:02:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Spectacular:  Selenese in an Executable Use Case</title>
		<link>http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/</link>
		<comments>http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 01:23:00 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Testing, TDD, ATDD]]></category>
		<category><![CDATA[Behavior Driven Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[spectacular]]></category>
		<category><![CDATA[acceptance test driven development]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[selenese]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[using spectacular]]></category>

		<guid isPermaLink="false">http://blog.minderupt.com/?p=159</guid>
		<description><![CDATA[This is the first part of many on how to use Spectacular, an open-source acceptance test / behavior driven development tool for development teams.  This installment will focus on how to use Spectacular to create Executable Use Cases, and how those use cases can be executed using Selenese to drive a Selenium browser!

Part of [...]


Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/' rel='bookmark' title='Permanent Link: Announcing:  Spectacular 1.0 ATDD/BDD Tool'>Announcing:  Spectacular 1.0 ATDD/BDD Tool</a></li>
<li><a href='http://blog.minderupt.com/2009/11/09/where-am-i/' rel='bookmark' title='Permanent Link: Where am I?'>Where am I?</a></li>
<li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is the first part of many on how to use <a href="http://spectacular.minderupt.com/" target="_new">Spectacular</a>, an open-source acceptance test / behavior driven development tool for development teams.  This installment will focus on how to use Spectacular to create <a href="http://code.google.com/p/spectacular/wiki/WritingExecutableUseCases" target="_new">Executable Use Cases</a>, and how those use cases can be executed using <a href="http://seleniumhq.org/docs/04_selenese_commands.html" target="_new">Selenese</a> to drive a <a href="http://seleniumhq.org/" target="_new">Selenium</a> browser!</p>
<hr />
<p>Part of why I wanted to write a tool like <a href="http://spectacular.minderupt.com" target="_new">Spectacular</a> is that I wanted to explore the possibility of using <a href="http://alistair.cockburn.us/Ultralight+use+cases+for+fine-grained+agile+development" target="_new">simplified Use Cases</a> in the context of <a href="http://agilesoftwaredevelopment.com/blog/artem/epics-and-themes" target="_new">Epics</a> in order to describe the overall requirement, in addition to using that Use Case to assist in creating stories during a story workshop.  Of course, the one thing bugging me about the whole subject is that I would also want those Use Cases to be completely testable.  Enter <a href="http://code.google.com/p/spectacular/wiki/WritingExecutableUseCases" target="_new">Executable Use Cases</a>.</p>
<p>The idea works like this:  Let&#8217;s say that during a <a href="http://blog.technicalmanagementinstitute.com/2009/10/agile-open-norcal-requirements-discovery-story-mapping-workshop.html" target="_new">story mapping workshop</a>, an agile team identified an Epic/Activity for logging into a system as an existing user.  They collaborated on a simple diagram showing how this would work:</p>
<p><img src="http://blog.minderupt.com/wp-content/uploads/2009/12/SampleWebFlowSpectacular.png" /></p>
<p>Using this <a href="http://allinthehead.com/retro/279/site-maps-for-web-applications" target="_new">web-flow diagram</a> as a guide, the team can now start to write a simplified use case in order to weed out some details and describe the user flow and interactions.  In <a href="http://spectacular.minderupt.com/" target="_new">Spectacular</a>, the requirement for a Use Case is to create a table with at least 2 columns (though 3 or more is typical, to describe ancillary details).  The first row should be the title of the use case, with the word &#8220;Flow&#8221; in there (i.e. &#8220;Primary Flow: Log In&#8221; or &#8220;Alternate Flow: Remember Me Log In&#8221;).  The next row are the column headers (&#8220;User Action&#8221;, &#8220;Expectation), followed by the use case itself.  Additional columns are ignored by Spectacular:</p>
<table border="1">
<tr>
<td>Primary Flow:</td>
<td colspan="2">Log In</td>
</tr>
<tr>
<td><b>User Action</b></td>
<td><b>Expectation</b></td>
<td><b>Comments</b></td>
</tr>
<tr>
<td>User navigates to system home page.</td>
<td>User sees system home page with a header of &#8220;Home Page&#8221;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>User clicks login link</td>
<td>User sees a login form requesting credentials</td>
<td>Credentials include username, password.  Should include a button for submission of form as well</td>
</tr>
<tr>
<td>User enters credentials and submits form</td>
<td>User sees a landing page with a list of submitted articles</td>
<td>&nbsp;</td>
</tr>
</table>
<p>Now that the team has written a use case, its time to make it executable.  Many of the use cases I run into with my Agile teams are user-interaction based, which is what inspired me to giving user the ability to express a use case as a series of <a href="http://seleniumhq.org/docs/04_selenese_commands.html" target="_new">Selenese</a> commands (in addition to writing the fixtures in Java, Ruby, and Groovy).  Once the team has agreed to the use case details (and brainstormed user stories from this i.e. bad login, already logged in, etc.), the team opens up a text editor or IDE and writes the fixture in Selenese:</p>
<pre language="ruby" line="1">

Flow: User navigates to system home page.
    open "/"
    waitForPageToLoad 5000

Expectation: User sees system home page with a header of "Home Page"
    verifyText "xpath://h1[class='mainHeader']" "Home Page"
    verifyText "id=loginLink" "Login"

Flow: User clicks login link
    click "id=loginLink"
    waitForPageToLoad 5000

Expectation: User sees a login form requesting credentials
    verifyElementPresent "id=usernameLogin"
    verifyElementPresent "id=passwordLogin"
    verifyElementPresent "xpath://input[@class='loginButton']"

Flow: User enters credentials and submits form
    type "id=usernameLogin" "myusername"
    type "id=passwordLogin" "mypassword"
    click "xpath://input[@class='loginButton']"
    waitForPageToLoad 5000

Expectation: User sees a landing page with a list of submitted articles
    verifyTitle "Welcome Michael!"
    verifyElementPresent "xpath://div[@class='article']"
</pre>
<p>Make sense?  The Selenese code above in a text file in effect becomes the fixture code for our executable use case.  Executing Spectacular would look like (assuming we named the Selenese file &#8220;login.selenese&#8221; and the spec as &#8220;SystemSpec.html&#8221;):</p>
<pre>
> Spectacular -fixtures ./login.selenese -specLocation ./SystemSpec.html
 -seleniumRCHost localhost -seleniumRCPort 4444
-seleniumRCInitialUrl http://system-uat/ -seleniumRCStartCommand *safari
</pre>
<p>(don&#8217;t worry, these commands can be stored in a <a href="http://code.google.com/p/spectacular/wiki/ProjectXML" target="_new">project xml</a> file so that running Spectacular doesn&#8217;t require such a long command line <img src='http://blog.minderupt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>By default, results are output in the current directory as &#8220;TestResults.html&#8221;, which will be the same document the team wrote, but with annotated test results in the use case table.  In our case, we haven&#8217;t written any implementation code yet, so it would look like this:</p>
<table border="1">
<tr>
<td>Primary Flow:</td>
<td colspan="2">Log In</td>
</tr>
<tr>
<td><b>User Action</b></td>
<td><b>Expectation</b></td>
<td><b>Comments</b></td>
</tr>
<tr>
<td bgcolor="red">User navigates to system home page. (FAIL) SeleniumException: URL &#8220;http://system-uat/&#8221; not available</td>
<td>User sees system home page with a header of &#8220;Home Page&#8221; (NOT PERFORMED)</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>User clicks login link (NOT PERFORMED)</td>
<td>User sees a login form requesting credentials (NOT PERFORMED)</td>
<td>Credentials include username, password.  Should include a button for submission of form as well</td>
</tr>
<tr>
<td>User enters credentials and submits form (NOT PERFORMED)</td>
<td>User sees a landing page with a list of submitted articles (NOT PERFORMED)</td>
<td>&nbsp;</td>
</tr>
</table>
<hr />
<p>This is the essence of writing Executable Use Cases with Spectacular.  For more details about how to write them or how to write the fixtures using other methods, visit the <a href="http://code.google.com/p/spectacular/wiki/WritingTestSpecs" target="_new">Spectacular EUC documentation</a>.</p>
<p>Next in the &#8220;Using Spectacular&#8221; series, I&#8217;ll focus on how to document the executable use cases along with FIT and Gherkin/BDD tests and what they look like&#8230;</p>


<p>Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/' rel='bookmark' title='Permanent Link: Announcing:  Spectacular 1.0 ATDD/BDD Tool'>Announcing:  Spectacular 1.0 ATDD/BDD Tool</a></li>
<li><a href='http://blog.minderupt.com/2009/11/09/where-am-i/' rel='bookmark' title='Permanent Link: Where am I?'>Where am I?</a></li>
<li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing:  Spectacular 1.0 ATDD/BDD Tool</title>
		<link>http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/</link>
		<comments>http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 16:00:12 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Testing, TDD, ATDD]]></category>
		<category><![CDATA[Behavior Driven Development]]></category>
		<category><![CDATA[Extreme Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[spectacular]]></category>
		<category><![CDATA[acceptance test]]></category>
		<category><![CDATA[acceptance test driven development]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[compliance]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[occ]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[selenese]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[sox]]></category>
		<category><![CDATA[specifications]]></category>
		<category><![CDATA[test driven development]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.minderupt.com/?p=100</guid>
		<description><![CDATA[Boy, have I been busy the past  couple months!  And now, I&#8217;m comfortable enough to announce what I&#8217;ve been working on &#8211; my first major open-source project:
Spectacular:  An Acceptance Test Driven Development tool for teams who like and/or must write official specs and who do not want to be constrained to a [...]


Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/' rel='bookmark' title='Permanent Link: Using Spectacular:  Selenese in an Executable Use Case'>Using Spectacular:  Selenese in an Executable Use Case</a></li>
<li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
<li><a href='http://blog.minderupt.com/2009/11/09/where-am-i/' rel='bookmark' title='Permanent Link: Where am I?'>Where am I?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Boy, have I been busy the past  couple months!  And now, I&#8217;m comfortable enough to announce what I&#8217;ve been working on &#8211; my first major open-source project:</p>
<h3><a target="_new" href="http://spectacular.minderupt.com/">Spectacular</a>:  An Acceptance Test Driven Development tool for teams who like and/or must write official specs and who do not want to be constrained to a single ATDD tool.</h3>
<p>Spectacular is an Acceptance Test Driven Development (ATDD) / Behavior Driven Development (BDD) tool that aggregates several different types of testing frameworks into 1, and it also introduces the idea of <a target="_new" href="http://code.google.com/p/spectacular/wiki/WritingExecutableUseCases">Executable Use Cases</a> (EUC) &#8211; if you have to write use cases, you might as well make them <strong>Not Suck</strong>.</p>
<p>The idea is that a Business Analyst (BA), Quality Assurance engineer (QA), or Developer can write a spec in any way they feel comfortable with, including diagrams and business rules if necessary. They can write tests in the form of Executable Use Cases, BDD-style tests (<a target="_new" href="http://wiki.github.com/aslakhellesoy/cucumber/gherkin">Gherkin/Given-When-Then</a> scenarios), and/or <a target="_new" href="http://fit.c2.com/">FIT</a>-style tests all within the same document. The tool will run through the document, &#8220;detect&#8221; test cases, execute them, and print out the results in the same format as it was input.</p>
<h3>Why build Spectacular?</h3>
<p>I work at a large financial services company, where compliance with <a target="_new" href="http://www.sarbanes-oxley.com/">Sarbanes-Oxley (SOX)</a> and <a target="_new" href="http://www.occ.treas.gov/">Office of the Comptroller of the Currency (OCC)</a> rules and regulations is of utmost importance, specifically with the audit requirements.</p>
<p>I suspect that there are many, many organizations out there who have to comply with the same set of rules, so I took what I learned about SOX and OCC audit requirements, combined them with what I learned at <a target="_new" href="http://testobsessed.com/">Elisabeth Hendrickson&#8217;s</a> AMAZING <a target="_new" href="http://qualitytree.com/classes/ats/">ATDD course</a>, and created Spectacular to make writing requirements more natural while also making those same documents executable, and not restricting any team to any single tool.</p>
<p>Also, I found through practical application of various ATDD tools that they are all pretty amazing and useful, but it was really annoying to use all these various tools to write specs and tests in different ways located in different locations depending on the tool being used. Plus, I would suspect that most teams would prefer to write story tests in a single document in a single format rather than having them live all over the place.</p>
<h3>Isn&#8217;t this whole idea&#8230; un-Agile?</h3>
<p>I don&#8217;t think so. Actually, I think something like Spectacular will help any large organization with an established corporate hierarchy and previous experience writing specifications in a use-case format adopt Agile more easily, especially those with &#8220;hardened&#8221; quality-assurance/quality-control groups. In my experience, these large organizations can be like &#8220;steering the Titanic with a small rudder&#8221; when it comes to transitioning to a more Agile process &#8211; allowing teams to continue writing requirements in the form of Use Case flows and documenting the tests in the same document will let them experiment with the various ATDD best-practices while remaining compliant with their regulatory bodies.</p>
<p>Spectacular helps those teams constrained with writing full-specs by allowing those teams to write the specs with tests embedded in them. Agility is introduced because those specs &#8211; written in a format they are used to &#8211; are now <em>executable</em>.  A core Agile practice IMHO.</p>
<h3>Use Cases?  Really?</h3>
<p>Yes, really.  <a target="_new" href="http://alistair.cockburn.us/Use+case+writing+guidelines">Use cases can tell a lot of the &#8220;story&#8221; if written well.</a>  Use cases, just like implementation code when written <i>after</i> a unit test is written, can be written well if there a constraint of <i>execution</i> behind it.  Also, traditionally use cases have been taken to a far extreme of complicated.  Not necessary IMHO.</p>
<p>To me, Use Cases fill the role of &#8220;Epic Spec&#8221; in an agile process.  I&#8217;m a huge believer in the practice of <a target="_new" href="http://www.agileproductdesign.com/blog/the_new_backlog.html">Story Mapping</a> and <a target="_new" href="http://www.slideshare.net/agileee/agile-journeys-by-david-hussman-2029404">Persona Development</a> (from Jeff Patton and Dave Hussman, respectively.  Two of my personal geek-heroes).  While doing your story mapping workshop, the high-level &#8220;activities&#8221; that you decompose into stories can very easily be Use Cases.  In fact, in my experience writing Use Cases to explain the high-level activity (or &#8220;Epic&#8221;) can help to decompose it into discreet stories.  And as such, each level of requirement-granularity (from Epic/Use Case to the Story) requires a different way to test it.</p>
<p>As such, I use Spectacular myself to execute Use Cases against Epics, and BDD/Gherkin and FIT tests to execute Stories.</p>
<h3>Enough already.  I get it.  Show me how it works&#8230;</h3>
<p>I don&#8217;t know about the rest of you, but I hate it when I stumble upon a <a target="_new" href="http://maven.apache.org/">useful open-source tool</a> only to find that the documentation <a target="_new" href="http://maven.apache.org/users/index.html">is poorly written</a>.  Now, I&#8217;m not saying Spectacular&#8217;s docs are amazing, but I did spend some time writing a good amount to make sure people could pick up Spectacular and use it relatively quickly.  All of the docs are located at the <a target="_new" href="http://code.google.com/p/spectacular/wiki/DocumentationIndex?tm=6">Spectacular Wiki on Google Code</a>.  I welcome all feedback so that the documentation can be improved!</p>
<p>But here&#8217;s an example.  Given a document:</p>
<hr />
<h2>Activity:  Registration</h2>
<p><b>(Executable Use Case)</b></p>
<table border="1">
<tr>
<td>Primary Flow: Register New User to System</td>
</tr>
<tr>
<td><b>User Action</b></td>
<td><b>Expectation</b></td>
<td><b>Comments</b></td>
</tr>
<tr>
<td>User navigates to &#8220;http://blog.minderupt.com/&#8221;</td>
<td>User sees blog site with existing blog entries</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>User clicks on &#8220;Log in&#8221; link</td>
<td>User sees page requesting credentials </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>User clicks on &#8220;Register&#8221; link</td>
<td>User sees page requesting registration info</td>
<td>Reg info includes a username, password, confirm password, and age!</td>
</tr>
<tr>
<td>User enters registration information and submits form</td>
<td>User sees page asking user to confirm</td>
<td>&nbsp;</td>
</tr>
</table>
<p><b>Business Rules:</b></p>
<ul>
<li>Username must not exist in system already</li>
<li>Email must not exist in system already</li>
<li>User must be 18 years or older</li>
<li>User must supply a username, email address (well formed), birth date, password.</li>
<li>User must confirm password before proceeding</li>
</ul>
<p><b>Story:  As a new user not already registered I want to register myself so that I can use the system.</b></p>
<p><b>(BDD/Gherkin Executable Test)</b></p>
<table border="1">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<p>Scenario:  Brand new user correctly registers</p>
<p>Given a username of &#8220;myusername&#8221; is not already registered<br />
  And an email address &#8220;myemail@email.com&#8221; is not already registered<br />
When a user registers with a username &#8220;myusername&#8221; and email address &#8220;myemail@email.com&#8221;<br />
Then the user is registered with a status of &#8220;PENDING APPROVAL&#8221;</p>
<p>Scenario:  Good username, duplicate email</p>
<p>Given a username of &#8220;myusername&#8221; is not already registered<br />
  And an email address &#8220;myemail@email.com&#8221; is registered<br />
When a user registers with a username &#8220;myusername&#8221; and email address &#8220;myemail@email.com&#8221;<br />
Then the user is not registered and is given an error indicating a duplicate email address.</p>
<p>Scenario:  Duplicate username, good email</p>
<p>Given a username of &#8220;myusername&#8221; is registered<br />
  And an email address &#8220;myemail@email.com&#8221; is not already registered<br />
When a user registers with a username &#8220;myusername&#8221; and email address &#8220;myemail@email.com&#8221;<br />
Then the user is not registered and is given an error indicating a duplicate username.</p>
</td>
</tr>
</table>
<p><b>Story:  As a new user not already registered I should not be able to skip any data elements so that&#8230;</b></p>
<p><b>(FIT executable test)</b></p>
<table border="1">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>Username</b></td>
<td><b>Password</b></td>
<td><b>Confirm Password</b></td>
<td><b>DOB</b></td>
<td><b>registered()</b></td>
</tr>
<tr>
<td>myusername</td>
<td>mypassword</td>
<td>mypassword</td>
<td>11/01/1960</td>
<td>true</td>
</tr>
<tr>
<td>username1</td>
<td>password1</td>
<td>password2</td>
<td>11/01/1960</td>
<td>false</td>
</tr>
<tr>
<td>myusername</td>
<td>mypassword</td>
<td>mypassword</td>
<td>01/01/2005</td>
<td>false</td>
</tr>
</table>
<hr />
<p>With these requirements written, Spectacular will run through this document and parse out the tests (basically, anything contained in a table and fitting particular patterns) and execute test fixtures for each of these.  While for version 1.0 Spectacular only supports Java (using <a target="_new" href="http://jbehave.org/">JBehave</a>) for the BDD/Gherkin and <a target="_new" href="http://fit.c2.com/">FIT</a> tests, Executable Use Case fixtures can be written in Java, <a target="_new" href="http://groovy.codehaus.org/">Groovy</a>, Ruby (experimental &#8211; using JRuby), and <a target="_new" href="http://seleniumhq.org/docs/04_selenese_commands.html">Selenese</a> (to directly drive a browser using SeleniumRC).  The ability to write fixtures for BDD/Gherkin and FIT in other languages is coming soon!  (I&#8217;d really like to be able to write BDD/Gherkin tests using Cucumber as the engine if possible)</p>
<ul>
<li><a target="_new" href="http://code.google.com/p/spectacular/wiki/WritingExecutableUseCaseFixtures">How to write a fixture for Executable Use Cases</a></li>
<li><a target="_new" href="http://code.google.com/p/spectacular/wiki/WritingBDDFixturesUsingJBehave">How to write a BDD/Gherkin fixture</a></li>
<li><a target="_new" href="http://code.google.com/p/spectacular/wiki/WritingFITFixtures">How to write a FIT fixture</a></li>
</ul>
<h3>In Conclusion&#8230;</h3>
<p>Try it out!  I hope the Agile community finds some use out of this tool like I have.  If you have any questions, you can leave them here in comments or join the <a target="_new" href="http://groups.google.com/group/spectacular-users">users</a> &#038; <a target="_new"  href="http://groups.google.com/group/spectacular-dev">dev</a> lists.</p>
<h3>Attribution</h3>
<p>Much of Spectacular is based in part or whole from the following projects: </p>
<ul>
<li><a target="_new" href="http://jbehave.org/">JBehave</a></li>
<li><a target="_new" href="http://fit.c2.com/">FIT</a></li>
<li><a target="_new" href="http://cukes.info/">Cucumber</a></li>
</ul>
<p>As well as from the teaching/writing/works from the following people:</p>
<ul>
<li><a target="_new" href="http://alistair.cockburn.us/A+user+story+is+the+title+of+one+scenario+whereas+a+use+case+is+the+contents+of+multiple+scenarios">Alistair Cockburn</a> (Use Case guru)</li>
<li><a target="_new" href="http://aslakhellesoy.com/">Aslak Hellesoy</a> (original author of Cucumber)</li>
<li><a target="_new" href="http://testobsessed.com/">Elisabeth Hendrickson</a> (amazing ATDD instructor and mentor)</li>
<li><a target="_new" href="http://dannorth.net/">Dan North</a> (the BDD guy at ThoughtWorks)</li>
<li><a target="_new" href="http://lizkeogh.com/">Liz Keogh</a> (the JBehave gal at ThoughtWorks)</li>
<li><a target="_new" href="http://www.nofluffjuststuff.com/conference/speaker/david_hussman">Dave Hussman</a> (agile Persona development)</li>
<li><a target="_new" href="http://www.agileproductdesign.com/blog/">Jeff Patton</a> (Story Mapping)</li>
</ul>


<p>Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/' rel='bookmark' title='Permanent Link: Using Spectacular:  Selenese in an Executable Use Case'>Using Spectacular:  Selenese in an Executable Use Case</a></li>
<li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
<li><a href='http://blog.minderupt.com/2009/11/09/where-am-i/' rel='bookmark' title='Permanent Link: Where am I?'>Where am I?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Where am I?</title>
		<link>http://blog.minderupt.com/2009/11/09/where-am-i/</link>
		<comments>http://blog.minderupt.com/2009/11/09/where-am-i/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 01:55:43 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Testing, TDD, ATDD]]></category>
		<category><![CDATA[Behavior Driven Development]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[spectacular]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.minderupt.com/?p=98</guid>
		<description><![CDATA[I haven&#8217;t updated my blog in a while&#8230;  sorry for that.  Besides my day job, I&#8217;ve been busily working on a new open-source project that has been in my head for quite a while now and I finally decided to just go for it.  I&#8217;m almost close to &#8220;announcing&#8221; it more publicly, but for right [...]


Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/' rel='bookmark' title='Permanent Link: Announcing:  Spectacular 1.0 ATDD/BDD Tool'>Announcing:  Spectacular 1.0 ATDD/BDD Tool</a></li>
<li><a href='http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/' rel='bookmark' title='Permanent Link: Using Spectacular:  Selenese in an Executable Use Case'>Using Spectacular:  Selenese in an Executable Use Case</a></li>
<li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t updated my blog in a while&#8230;  sorry for that.  Besides my day job, I&#8217;ve been busily working on a new open-source project that has been in my head for quite a while now and I finally decided to just go for it.  I&#8217;m almost close to &#8220;announcing&#8221; it more publicly, but for right now I am gathering some feedback from colleagues before I unleash my horrifying code for the world to consume. <img src='http://blog.minderupt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>More later&#8230;</p>


<p>Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/' rel='bookmark' title='Permanent Link: Announcing:  Spectacular 1.0 ATDD/BDD Tool'>Announcing:  Spectacular 1.0 ATDD/BDD Tool</a></li>
<li><a href='http://blog.minderupt.com/2009/12/31/using-spectacular-selenese-in-an-executable-use-case/' rel='bookmark' title='Permanent Link: Using Spectacular:  Selenese in an Executable Use Case'>Using Spectacular:  Selenese in an Executable Use Case</a></li>
<li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.minderupt.com/2009/11/09/where-am-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh, BDD.  How I love you so.</title>
		<link>http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/</link>
		<comments>http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/#comments</comments>
		<pubDate>Tue, 05 May 2009 17:14:41 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Agile Testing, TDD, ATDD]]></category>
		<category><![CDATA[Behavior Driven Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[compliance]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[dan north]]></category>
		<category><![CDATA[jbehave]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[spec]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://blog.minderupt.com/?p=50</guid>
		<description><![CDATA[Here I thought I was going to have to bite the bullet and learn more than a little bit of Ruby by way of Behavior Driven Development.  I thought I was going to have to actually put my head down and start active coding in Ruby in order to use the Cucumber BDD framework, specifically [...]


Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/' rel='bookmark' title='Permanent Link: Announcing:  Spectacular 1.0 ATDD/BDD Tool'>Announcing:  Spectacular 1.0 ATDD/BDD Tool</a></li>
<li><a href='http://blog.minderupt.com/2009/05/04/acceptance-test-driven-development-part-1/' rel='bookmark' title='Permanent Link: Acceptance Test Driven Development:  Part 1'>Acceptance Test Driven Development:  Part 1</a></li>
<li><a href='http://blog.minderupt.com/2009/11/09/where-am-i/' rel='bookmark' title='Permanent Link: Where am I?'>Where am I?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here I thought I was going to have to bite the bullet and learn <em>more than a little bit</em> of Ruby by way of <a href="http://behaviour-driven.org/" target="_blank">Behavior Driven Development</a>.  I thought I was going to have to actually put my head down and start active coding in Ruby in order to use the <a href="http://cukes.info/" target="_blank">Cucumber BDD framework</a>, specifically to parse the <a href="http://wiki.github.com/aslakhellesoy/cucumber/given-when-then" target="_blank">Given/When/Then</a> clauses.</p>
<p>I thought about writing my own framework to do just that in Java, and actually started to.  Then I went to the magical Google and &#8211; wouldn&#8217;t you know it? &#8211; I found <a href="http://jbehave.org/" target="_blank">JBehave</a>.  Of course!  I knew <a href="http://dannorth.net/" target="_blank">Dan </a>wouldn&#8217;t have let me down by making me go the way of Ruby <img src='http://blog.minderupt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   (not that there&#8217;s anything wrong with Ruby, I just like to take my sweet time <a href="http://www.testearly.com/2006/07/26/have-you-drank-the-kool-aid/" target="_blank">drinking kool-aid</a> <img src='http://blog.minderupt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>I love how it is just as easy to write JBehave tests as it is to write Cucumber tests:</p>
<blockquote><p>
<strong>Given </strong>a user with the email address &#8220;someone@something.com&#8221; has not already registered with the system<strong><br />
When </strong>a user tries to register in the system with the email of &#8220;someone@something.com&#8221;<br />
And a name of &#8220;Michael Dowling&#8221;<br />
And a date of birth of &#8220;1/1/1985&#8243; (yeah right)<strong><br />
Then </strong>register the user with an access token of &#8220;Registered&#8221;</p></blockquote>
<p>In JBehave, being clearly well-designed in an <a href="http://martinfowler.com/articles/injection.html" target="_blank">IoC</a> manner, asks you write the Steps to execute the above spec:</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">minderupt.scenarios.steps</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.scenario.annotations.Given</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.scenario.annotations.Then</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.scenario.annotations.When</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.scenario.steps.Steps</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CreateUserSteps <span style="color: #000000; font-weight: bold;">extends</span> Steps <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399; font-weight: bold;">String</span> email<span style="color: #339933;">;</span>
&nbsp;
	@Given<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a user with the email address <span style="color: #000099; font-weight: bold;">\&quot;</span>$email<span style="color: #000099; font-weight: bold;">\&quot;</span> has not already registered with the system&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> checkForRegisteredUser<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> email<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// code to check for pre-existing email</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@When<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a user tries to register in the system with the email of <span style="color: #000099; font-weight: bold;">\&quot;</span>$email<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> registerUserWithEmail<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> email<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// code to register with email</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@When<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a name of <span style="color: #000099; font-weight: bold;">\&quot;</span>$name<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> registerUserWithFullName<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> name<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// code to register with name</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@When<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a date of birth of <span style="color: #000099; font-weight: bold;">\&quot;</span>$dob<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> registerUserWithDateOfBirth<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> dob<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// code to register with DOB</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@Then<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;register the user with an access token of <span style="color: #000099; font-weight: bold;">\&quot;</span>$token<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> checkForCreatedUser<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> tokenExpected<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// register user and confirm returned token, blah blah</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>&#8230;and then write the actual test case, specifying configuration options and the actual steps to execute during the test:</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">minderupt.scenarios</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.scenario.JUnitScenario</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.scenario.Scenario</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">minderupt.scenarios.steps.CreateUserSteps</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CreateUser <span style="color: #000000; font-weight: bold;">extends</span> Scenario <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> CreateUser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> CreateUserSteps<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I like this approach for multiple reasons, not the least because I can re-use the steps for different spec documents utilizing the same language, but also, I can change the test case configuration so that on my dev machine (local build) I can run all the tests and simply outputthe results to my console, but in my <a href="http://cruisecontrol.sourceforge.net/" target="_blank">CI system</a>, the output goes out to some kind of standard reporting system in pretty HTML.  Yay.</p>
<p>Like I mentioned in a previous post, one of the things I want to do is be able to fully spec out a requirement in a document (in Word, HTML, Wiki, etc) which will have a mix of business logic rules, <a href="http://fit.c2.com/" target="_blank">FIT tests</a>, and BDD tests.  Then as part of a build, split out the FIT tests and run FIT against those, parse out the BDD tests and run those, and then output a report back into the combined document for the entire team to see.  Can&#8217;t be too hard, just a matter of parsing Word/HTML, recognizing the type of tests, and running them.  Integration project, really.</p>
<p>But I think it would be immensely useful, especially for organizations that (still) communicate over such types of documentation;  a behavior that I feel isn&#8217;t going away anytime soon.  Might as well make the transition a little bit easier, I think.</p>


<p>Related posts:<ol><li><a href='http://blog.minderupt.com/2009/12/28/announcing-spectacular-1-0-atddbdd-tool/' rel='bookmark' title='Permanent Link: Announcing:  Spectacular 1.0 ATDD/BDD Tool'>Announcing:  Spectacular 1.0 ATDD/BDD Tool</a></li>
<li><a href='http://blog.minderupt.com/2009/05/04/acceptance-test-driven-development-part-1/' rel='bookmark' title='Permanent Link: Acceptance Test Driven Development:  Part 1'>Acceptance Test Driven Development:  Part 1</a></li>
<li><a href='http://blog.minderupt.com/2009/11/09/where-am-i/' rel='bookmark' title='Permanent Link: Where am I?'>Where am I?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acceptance Test Driven Development:  Part 1</title>
		<link>http://blog.minderupt.com/2009/05/04/acceptance-test-driven-development-part-1/</link>
		<comments>http://blog.minderupt.com/2009/05/04/acceptance-test-driven-development-part-1/#comments</comments>
		<pubDate>Mon, 04 May 2009 16:11:41 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Agile Testing, TDD, ATDD]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[behavior driven development]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[cuke]]></category>
		<category><![CDATA[requirements]]></category>
		<category><![CDATA[scattered thoughts]]></category>

		<guid isPermaLink="false">http://blog.minderupt.com/?p=18</guid>
		<description><![CDATA[A couple weeks ago I attended a public class led by Elisabeth Hendrickson and Dale Emery (which, btw, was aboslutely AMAZING and if you have not taken their class before, I would highly recommend that you do so).  Two things stood out during that 3-day class:  Elisabeth&#8217;s simulation (where we all naturally migrated to a [...]


Related posts:<ol><li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A couple weeks ago I attended a public class led by <a href="http://testobsessed.com/" target="_blank">Elisabeth Hendrickson</a> and <a href="http://dhemery.com/" target="_blank">Dale Emery</a> (which, btw, was aboslutely AMAZING and if you have not taken their class before, I would highly recommend that you do so).  Two things stood out during that 3-day class:  Elisabeth&#8217;s <a href="http://www.qualitytree.com/classes/wordcount/" target="_blank">simulation </a>(where we all naturally migrated to a more test-first process), and the discussion around ATDD using natural domain language.</p>
<p>For example:</p>
<blockquote><p><strong>Given </strong>a user with the email address &#8220;someone@something.com&#8221; has not already registered with the system</p>
<p><strong>When </strong>a user tries to register in the system with the email of &#8220;someone@something.com&#8221;</p>
<p>And a name of &#8220;Michael Dowling&#8221;</p>
<p>And a date of birth of &#8220;1/1/1985&#8243; (yeah right)</p>
<p><strong>Then </strong>register the user with an access token of &#8220;Registered&#8221;</p></blockquote>
<p>This executes the following <a href="http://www.rubyinside.com/cucumber-the-latest-in-ruby-testing-1342.html" target="_blank">Cucumber</a> code (in Ruby):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">Given <span style="color:#006600; font-weight:bold;">/</span>a user with the email address <span style="color:#996600;">&quot;(.*?)&quot;</span> has <span style="color:#9966CC; font-weight:bold;">not</span> already registered with the <span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>email<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#0066ff; font-weight:bold;">@email</span> = email
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">When</span> <span style="color:#006600; font-weight:bold;">/</span>a user tries to register <span style="color:#9966CC; font-weight:bold;">in</span> the <span style="color:#CC0066; font-weight:bold;">system</span> with the email of <span style="color:#996600;">&quot;(.*?)&quot;</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>registerEmail<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#0066ff; font-weight:bold;">@registerEmail</span> = registerEmail
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">When</span> <span style="color:#006600; font-weight:bold;">/</span>a name of <span style="color:#996600;">&quot;(.*?)&quot;</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>name<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#0066ff; font-weight:bold;">@registerName</span> = name
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">When</span> <span style="color:#006600; font-weight:bold;">/</span>a date of birth of <span style="color:#996600;">&quot;(.*?)<span style="color:#000099;">\/</span>(.*?)<span style="color:#000099;">\/</span>(.*?)&quot;</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>dobMonth, dobDay, dobYear<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#0066ff; font-weight:bold;">@month</span> = dobMonth
  <span style="color:#0066ff; font-weight:bold;">@day</span> = dobDay
  <span style="color:#0066ff; font-weight:bold;">@year</span> = dobYear
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">Then</span> <span style="color:#006600; font-weight:bold;">/</span>register the user with an access token of <span style="color:#996600;">&quot;Registered&quot;</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  token = RegistrationService.<span style="color:#9900CC;">register</span> <span style="color:#0066ff; font-weight:bold;">@registerEmail</span> <span style="color:#0066ff; font-weight:bold;">@registerName</span> <span style="color:#0066ff; font-weight:bold;">@month</span> <span style="color:#0066ff; font-weight:bold;">@day</span> <span style="color:#0066ff; font-weight:bold;">@year</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> token != <span style="color:#996600;">&quot;Registered&quot;</span>
    <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#996600;">&quot;Not registered&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>The neat part of this is that it is an executable document;  meaning, it is input to &#8220;test fixtures&#8221; written by development to test the software being developed from an acceptance point-of-view.  This is the essence of &#8220;<a href="http://behaviour-driven.org/" target="_blank">Behavior Driven Development</a>&#8221; or BDD, of which I am a total convert.</p>
<p>I want to write much more about this topic &#8211; and I will.  For now, though, the one though swirling through my head is the need to have documents be in formats large organizations (such as my employer) use to describe requirements (<a href="http://dannorth.net/introducing-bdd" target="_blank">behaviors</a>).  I doubt it will be possible for most teams to check-in plain text files and be comfortable with that.  Plus, these documents will need to be passed around, possibly stored in Wikis, or other document management systems (even though ideally, these documents would be in source control along with the ATDD code).</p>
<p>I think I found a new project for myself.  Hmmm&#8230;.</p>


<p>Related posts:<ol><li><a href='http://blog.minderupt.com/2009/05/05/oh-bdd-how-i-love-you-so/' rel='bookmark' title='Permanent Link: Oh, BDD.  How I love you so.'>Oh, BDD.  How I love you so.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.minderupt.com/2009/05/04/acceptance-test-driven-development-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>News: Careful With Your Coverage Metrics</title>
		<link>http://blog.minderupt.com/2008/11/25/news-careful-with-your-coverage-metrics/</link>
		<comments>http://blog.minderupt.com/2008/11/25/news-careful-with-your-coverage-metrics/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 22:29:45 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Testing, TDD, ATDD]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[clover]]></category>
		<category><![CDATA[cobertura]]></category>
		<category><![CDATA[code coverage]]></category>
		<category><![CDATA[codecover]]></category>
		<category><![CDATA[emma]]></category>
		<category><![CDATA[gcov]]></category>
		<category><![CDATA[infoq]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://blog.minderupt.com/?p=3</guid>
		<description><![CDATA[I&#8217;ve always been a huge believer in using Code Coverage tools (such as Clover, CodeCover, EMMA, gcov, etc) as a way to report on how in-depth your unit tests are.  Generally, I use them with Quality Assurance/Quality Control groups to determine where to focus any additional testing efforts during a Sprint.  While we tend to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been a huge believer in using Code Coverage tools (such as <a href="http://www.atlassian.com/software/clover/">Clover</a>, <a href="http://codecover.org/">CodeCover</a>, <a href="http://emma.sourceforge.net/">EMMA</a>, <a href="http://gcc.gnu.org/onlinedocs/gcc/Gcov.html">gcov</a>, etc) as a way to report on how in-depth your unit tests are.  Generally, I use them with Quality Assurance/Quality Control groups to determine where to focus any additional testing efforts during a Sprint.  While we tend to benchmark required coverage at 85%, this is always a general rule with the understanding that every project (and, therefore, every project&#8217;s code) is going to be different, with different needs.</p>
<p>An interesting post at InfoQ talks a bit about the need to be careful about using a required coverage metric during TDD:</p>
<blockquote><p>Out of the gates, Gruber&#8217;s primary statement is that TDD proponents do not suggest code coverage as &#8220;a one true metric&#8221;, that it is useful but only to degree and taken in context with other sources of feedback. He denounces Pang&#8217;s claim that &#8220;(Pang) 100% code coverage has long been the ultimate goal of testing fanatics&#8221;, stating that &#8220;(Gruber) high code coverage is a desired attribute of a well tested system, but the goal is to have a fully and sufficiently tested system&#8221;.</p></blockquote>
<p>I completely agree with this statement.  Code coverage is, again, a tool for determining where additional testing time can be spent, as well as identifying any risks of releasing code into production that is not currently covered by unit tests.</p>
<p>The following quote sums it up nicely:</p>
<blockquote><p>code coverage [in the context of TDD] is a great way to notice that you screwed up and missed something, but nothing else</p></blockquote>
<p>More information can be found on <a href="http://www.infoq.com/news/2008/11/coverage-NE-tdd">InfoQ&#8217;s post</a>.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.minderupt.com/2008/11/25/news-careful-with-your-coverage-metrics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
