acceptance testing

Idea

+status

 

Given that

  1. as we near 1.0, the behavior of Wagn is reaching a milestone of completeness and correctness
  2. the current test suite is essential but somewhat disorganized and patchy
  3. the codebase is working well but mis-architected in places, and large sections are in need of major refactoring to support our long-term vision

We should create a suite of high-level acceptance tests that captures and codifies this current behavior, which we can work against during subsequent architectural refactorings.

 

 

As of early 2009 the combination of Cucumber and Webrat is gaining acceptance as a best-practice in acceptance testing for Rails applications.  Cucumber an english-like syntax and more importantly a structure for thinking about the behavior of the application.  Webrat provides a mechanism for specifying interactions with the application at a high level, and can be connected to Selenium for testing ajax functionality that requires real browser interaction. 

 

On a technical note, Cucumber uses "step definitions" written in ruby to process the feature specs written in cucumber syntax.  Given the thematic conistency of working with cards in wagn, I think that a wide range feature behavior can be specified with a fairly small number of step definitions, ie. the setup will be compact.

 

My estimate for developing a reasonably complete acceptance test suite is 3 developer days for setup (step definitions, initial tests, ajax/selenium setup), and 4-6 additional developer days for completing the spec.  The latter part would be best done as pair coding in a sprint.  

 

I would love to see this happen sometime in 2009 :)

 

 

 

this is a braindump of features and types of scenarios that should be tested, ie high level list of tests that we need.

 

FEATURES

Accounts

  sign up
  sign in
  ...

Basic Editing

  create
  delete
  edit
    name
    type
    content
  history
  autosave

References

  inclusions 
    views: open,closed,naked,etc.
  links
  Editing included cards
    create
    delete
    edit
      name
      type
      content

Important Cardtypes

  Cardtype
  Search
  Pointers (autocomplete specs, etc.)
  Images & Files

Templating              

  *rforms
  *tforms
  multi-edit
    create
    delete
    edit

Permissions 

 

Combinations

  references and search   (common patterns)
  templated searches
  other auto and phantom cards

 

+relevant user stories