The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Story Card to FIT tests

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Keith Ray

Posts: 658
Nickname: keithray
Registered: May, 2003

Keith Ray is multi-platform software developer and Team Leader
Story Card to FIT tests Posted: Nov 28, 2005 5:28 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Keith Ray.
Original Post: Story Card to FIT tests
Feed Title: MemoRanda
Feed URL: http://homepage.mac.com/1/homepage404ErrorPage.html
Feed Description: Keith Ray's notes to be remembered on agile software development, project management, oo programming, and other topics.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Keith Ray
Latest Posts From MemoRanda

Advertisement

This is an partial example of how a story-card might be 'translated' into FIT tests -- this example is paraphrased from the middle chapters of "FIT for developing software" by Mugridge & Cunningham.

Here's a story card:

+--------------------------------------------------------+
|  CreateRentalTemplate                                  |
|                                                        |
|  A rental template defines a list of rental items. The |
|  template specifies the proportion of each item per    |
|  person. The user can select a template and specify the|
|  number of people to rent those items.                 |
|                                                        |
+--------------------------------------------------------+

To accompany the story, there is discussion (verbal, spoken) between the programmers, testers, and the person that understands the requirements: the "Customer" in XP terminology, "Product Owner", "Domain Expert", etc. I'll leave out estimation and scheduling of stories, which are taken care of by Release Planning and Iteration Planning.

In the case of this story, there is discussion of how rounding-up will occur when the number of people specified doesn't exactly match the proportions in the Rental Template, so the test is written to use numbers that test the rounding-up.

Using FIT or Fitnesse, one acceptance test for CreateRentalTemplate would look something more or less like this:

--------------------------------------------------
| Create rental template | Coffee break          |
--------------------------------------------------
| one | coffee dispenser    | for | 20  | people |
--------------------------------------------------
| one | coffee table        | for | 40  | people |
--------------------------------------------------
| one | cup                 | for | 0.9 | people |
--------------------------------------------------

--------------------------------------------------------
| begin transaction for client | Joanna                |
--------------------------------------------------------
| fill template | Coffee break | for | 21 | people     |
--------------------------------------------------------
| pay cash | 65.00                                     |
--------------------------------------------------------
| end transaction                                      |
--------------------------------------------------------
| rentals of client | Joanna  |
-------------------------------
| rental item         | count |
-------------------------------
| coffee dispenser    | 2     |
-------------------------------
| coffee table        | 1     |
-------------------------------
| cup                 | 24    |
-------------------------------

The code to make this work would involve implementation various kinds of fixture classes, that will be instantiated by the FIT framework, and which in turn call the model objects to exercise the application. Initially the FIT tests will fail because the model objects do not exist or do not yet have required functionality. Use test-driven-development to create the model objects with the required behaviors. Then the FIT tests should pass.

See http://fit.c2.com/ for info about FIT, see http://fitnesse.org/ for info about Fitnesse.

Read: Story Card to FIT tests

Topic: Microsoft Listens Previous Topic   Next Topic Topic: Dabble gets more Notice

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use