The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Acceptance Testing in Smalltalk

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
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Acceptance Testing in Smalltalk Posted: Apr 26, 2006 12:35 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Acceptance Testing in Smalltalk
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Randy Coulman with Key Technologies is going to talk about Acceptance testing with Fit, FitNesse, and FitLibrary. This is going to be more of an overview of the tools than anything. Randy: Working for Key and doing Smalltalk for afive years.

The example we'll use - the game "Mastermind". Basic idea - you set up a "code" (colored pegs in sequence), and your opponent tries to break the code. Randy broke down the rules into a set of Fit tests using the Fit Wiki server (FitNesse). Fit is the acceptance testing framework from Ward Cunningham. FitLibrary is a set of additional fixtures. Available for:

  • VW, VAST (port in progress)
  • Java
  • .NET
  • C/C++/C#
  • Python
  • Ruby
  • Perl
  • PHP
  • et. al.

Randy is the maintainer of the Smalltalk (VW) port. The idea is that you write the tests in HTML pages, and then run them on any back end - thus making the acceptance testing live above the implementation lavel. The developers create fixture code that runs the tests themselves. The writing:

  • Subclass the desired fixture class (ActionFixture used directly most times)
  • implement #signatureFor: to provide type adaptor information
  • Implement the necessary instance variables and methods

ColumnFixture

This is the simplest one - each row is a different scenario. Each column is either and input or an output. The expected outputs are compared to actuals, and then the test is marked red (fail) green (pass). Rows and columns refer to the HTML table used for presentation.

ActionFixture

You create "workflow" type tests with this. There are actions to deal with - start, enter, press, check - you create a helper class to implement. This one can be brittle.

RowFixture

This is used to check a collection of results (eg - results of a query). The order of the rows doesn't matter, it's smart about matching up rows. It will show missing/surplus rows.

Then there are a set of extension fixtures - DoFixture, SetUpFixture, SetFixture/ArrayFixture, CalculateFixture (and more). Randy has a few implemented, is doing more.

DoFixture

Must be the first one on a test page - it's a "workflow" fixture. Takes over execution of remaining tables. It's less verbose than an ActionFixture.

SetUpFixture

Used to set up data for a test. Similar to givens in a ColumnFixture - no feedback in the table

Set/ArrayFixture

Similar to RowFixture, but easier to write. You just create a set and it gets auto-wrapped. In SetFixture, order is irrelevant, in ArrayFixture, it matters.

CalculateFixture

Similar to ColumnFixture - no header markup needed to distinguish givens and expected values.

Now a demo of the way it works - I'd take a picture, but it turns out that I can't email myself pictures from here - which means that I need a real camera :) You can download all this stuff and try it out:

"How do I debug a test?" Well, in Smalltalk it's simple - you use the debugger that's right there, and slap in a breakpoint. It's a little more complicated over in curly-brace-ville.

Read: Acceptance Testing in Smalltalk

Topic: Croquet SDK Released Previous Topic   Next Topic Topic: Team-Building Stages and Agile

Sponsored Links



Google
  Web Artima.com   

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