Loading ...
Sorry, an error occurred while loading the content.

108641Re: [XP] Running Tested Features

Expand Messages
  • yahoogroups@jhrothjr.com
    Jul 11, 2005
      From: "Rob Syvertsen"
      To: "extremeprogramming@yahoogroups.com"
      Sent: Monday, July 11, 2005 4:43 PM
      Subject: RE: [XP] Running Tested Features

      > PierG wrote:
      >>Let's talk about real life: a real example. Let's suppouse that you
      >>have to add a 'Save as' feature to your word processor.
      >>Here are some questions:
      >>. how do you define this feature?
      > Talk to your customer. He defines the feature (with your help to guide
      > him along)
      > You: So let's talk about this 'Save as' story. How is it different from
      > the 'Save' story we already did?
      > Customer: Well, it's like MS Word.
      > You: What do you mean?
      > Customer: It brings up a window so you can type in a new name and stuff.
      > You: What other stuff? Can you change the directory?
      > Customer: Ya! I always use that. I don't want all my documents in My
      > Documents. My company says I have to keep them on the network drives.
      > Etc...

      At some point I'd cut that short by pointing out that there is a
      standard way of doing it on Windows, and asking if that's
      acceptable, or if the customer wants anything different. I'd probably
      motivate that by waving the "the standard way is cheap, doing
      something different is going to be expensive" flag.

      >>. how do you 'specify' the acceptance test?

      > It must do everything the customer asked for in the above conversation.
      > Testing will be much harder if you just call into the Common File Dialog
      > directly than if you put a wrapper around it that let's you substitute a
      > mock object. If you follow the Do the Simplest Thing That Could
      > Possibly Work guideline, you'll probably call the Common File Dialog at
      > some point and let MS do all the hard work for you.

      Since I've gotten agreement to do the standard thing (same as every
      other application the customer uses on Windows), I'll just test to see
      if the application creates the right file with the right name in the right
      place. FitLibrary has a reasonable fixture for that. I might use it, or I
      might take the basic idea and run with it.

      IIRC, the common file dialog does not actually save the file; it gives
      you the file name to write to. The call to the common file dialogs thus
      belongs in the concrete GUI layer with all the other interfaces with
      the GUI toolkit. We normally recommend that acceptance tests
      come in somewhere under the concrete GUI layer (the "anorexic
      GUI layer" or "humble dialog box" approach).

      What we need to know (and verify) is _which_ concrete GUI class
      got called. This is something we need to know anyway in order to
      make a legitimate test at this level, so it's "business as usual."

      John Roth
    • Show all 24 messages in this topic