Exploration Through Example

Example-driven development, Agile testing, context-driven testing, Agile programming, Ruby, and other things of interest to Brian Marick
191.8 167.2 186.2 183.6 184.0 183.2 184.6

Wed, 07 Apr 2004

Inline comments in Fit

Part of a series on FIT extensions and stylistic tricks.

One of the nice things about FIT is that you can interweave explanatory text with tables that serve as both examples and tests:

A clinician can have the clinic absorb some charges. Perhaps a test was done only for educational purposes, or the animal stayed an extra day.

AnimalProgressFixture
Note: this is a StepFixture.
new case
2353
Peoria
order
intensive care


charge
100


charge
900
clinic

check
balance
1000

check
balance
clinic
900
check
balance
Peoria
100
...


Certain charges are always paid by the state.

AnimalProgressFixture
...


I love that. (See also Mark Miller's Updoc, which is used with a scripting-ish language called E.)

I also find it useful to put "inline" comments in my tests. I do that by taking advantage of the way that Fit stops looking at table cells when it sees the first empty one in a left-to-right scan. So I leave a blank cell and write a comment in the next one. Here's the above test, so annotated:

AnimalProgressFixture
new case
2353
Peoria

order
intensive care



charge
100


Normal diagnostics yield nothing, but the clinician wants to press on...
charge
900
clinic

Absorb excess diagnosis charge.
...



I think this sort of thing is useful, particularly for step-by-step tests, because it helps the test tell a story, helps it make sense in business terms to both the reader and the writer.

## Posted at 14:26 in category /fit [permalink] [top]

PLoP 2004 reminder

The PLoP 2004 submission deadline is rapidly approaching.

## Posted at 07:02 in category /misc [permalink] [top]

Using XML for Ant

The Ant inventor reflects:

If I knew then what I know now, I would have tried using a real scripting language, such as JavaScript via the Rhino component or Python via JPython, with bindings to Java objects which implemented the functionality expressed in todays tasks. Then, there would be a first class way to express logic and we wouldn't be stuck with XML as a format that is too bulky for the way that people really want to use the tool.

Or maybe I should have just written a simple tree based text format that captured just what was needed to express a project and no more and which would avoid the temptation for people to want to build a Turing complete scripting environment out of Ant build files.

Both of these approaches would have meant more work for me at the time, but the result might have been better for the tens of thousands of people who use and edit Ant build files every day.

(Via Keith Ray.)

## Posted at 06:57 in category /misc [permalink] [top]

Big Visible Things

Alberto Savoia describes some clever and fun feedback devices. Scroll through to look at the pictures, then read the text.

## Posted at 06:51 in category /agile [permalink] [top]

About Brian Marick
I consult mainly on Agile software development, with a special focus on how testing fits in.

Contact me here: marick@exampler.com.

 

Syndication

 

Agile Testing Directions
Introduction
Tests and examples
Technology-facing programmer support
Business-facing team support
Business-facing product critiques
Technology-facing product critiques
Testers on agile projects
Postscript

Permalink to this list

 

Working your way out of the automated GUI testing tarpit
  1. Three ways of writing the same test
  2. A test should deduce its setup path
  3. Convert the suite one failure at a time
  4. You should be able to get to any page in one step
  5. Extract fast tests about single pages
  6. Link checking without clicking on links
  7. Workflow tests remain GUI tests
Permalink to this list

 

Design-Driven Test-Driven Design
Creating a test
Making it (barely) run
Views and presenters appear
Hooking up the real GUI

 

Popular Articles
A roadmap for testing on an agile project: When consulting on testing in Agile projects, I like to call this plan "what I'm biased toward."

Tacit knowledge: Experts often have no theory of their work. They simply perform skillfully.

Process and personality: Every article on methodology implicitly begins "Let's talk about me."

 

Related Weblogs

Wayne Allen
James Bach
Laurent Bossavit
William Caputo
Mike Clark
Rachel Davies
Esther Derby
Michael Feathers
Developer Testing
Chad Fowler
Martin Fowler
Alan Francis
Elisabeth Hendrickson
Grig Gheorghiu
Andy Hunt
Ben Hyde
Ron Jeffries
Jonathan Kohl
Dave Liebreich
Jeff Patton
Bret Pettichord
Hiring Johanna Rothman
Managing Johanna Rothman
Kevin Rutherford
Christian Sepulveda
James Shore
Jeff Sutherland
Pragmatic Dave Thomas
Glenn Vanderburg
Greg Vaughn
Eugene Wallingford
Jim Weirich

 

Where to Find Me


Software Practice Advancement

 

Archives
All of 2006
All of 2005
All of 2004
All of 2003

 

Join!

Agile Alliance Logo