Acceptance test spike example

Andrew McDonagh news at
Mon Jun 27 01:56:13 CEST 2005

Steve Jorgensen wrote:
> I'm posting this message for 2 reasons.
> First, I'm still pretty new and shakey to the whole Acceptance Testing thing,
> and I'm hoping for some feedback on whether I'm on the right track.  Second,
> although all the Agile literature talks about the importance of doing
> Acceptance Testing, there's very little in any of the books or out on the Web
> that helps with how to do it.  If I am on the right track, this will be one
> more helpful item folks can find on a Google search.
> The code below is basically a spike I wrote in a few hours last night to prove
> to myself and my team that it would be feasible to quickly create a simple,
> useful Acceptance Testing harness for our learning project.
> First, I wrote an example test script I would hope to be able to execute...
> ===============
> ?recipeListCount:0
> !new
> ?name:"New Recipe"
> name:"PB&J"
> ?name:"PB&J"
> !save
> !close
> ?recipeListCount:1
> !goToListItem 1
> !openListItem
> ?name:"PB&J"
> ===============


Its best to aim the Acceptance Test at your Customers level of 
expertise, not at the developers. As a Customer is the person best 
placed to tell us What they want. Yes Our team people (Devs or testers) 
can help write the actual tests, but the Customer should still be able 
to read them. After all, the tests are Executable Requirements.

There's two flavors of Customer oriented styles I've come across.

The first uses a Domain Specific using your values above..

IsTotalNumberOfRecipes 0

RecipeNameToUse  "PB&J"

IsTotalNumberOfRecipes 1

IsThereOneRecipeCalled "PB&J"

All commands are the first full word. No need for special tokens to 
decide what the command is supposed to do, as each Command is the name 
of a class to use.

You can use reflection to dynamically create the Command instances or 
the name can be used by a factory as an id.

The Commands themselves know what they are supposed to do, not the 
Script parsing engine.

The second approach is using FIT/Fitnesse - google these for exact 
description. They take information in Table form. This allows the 
customer to use any software to create the test scripts, so long as it 
can create tables: Word processors, Spread Sheets, etc.


More information about the Python-list mailing list