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

Re: [XP] Testing GUI applications

Expand Messages
  • Micron Engineering
    ... In my experience it is always possible couple a class to a GUI container object (most common are windows or forms) and transfer to it all the business
    Message 1 of 9 , Nov 19, 2007
    • 0 Attachment
      martinhart2001 ha scritto:
      >
      > --- In extremeprogramming@yahoogroups.com
      > <mailto:extremeprogramming%40yahoogroups.com>, "D. André Dhondt"
      > <d.andre.dhondt@...> wrote:
      >>
      >>> How should I be doing my 'test-first' when the GUI is so embedded
      >>> in the process?
      >>
      >> Does your GUI really need to be so tightly coupled to the other
      > layers?
      >
      > Possibly not, but possible it does. It would not be viable to transit
      > records to and from the GUI to a business store due to the quantity
      > of information. Also event handlers are pretty abundant!
      In my experience it is always possible couple a class to a GUI container
      object (most common are windows or forms) and transfer to it all the
      business logic; this simplify a lot your tests because you may define a
      test class that simulates user input and interactions just calling the
      interfaced class methods. Also if you plan to "translate" your project
      to a different o.s. this organization will help a lot. You may also
      implement a class to register user inputs on a file (there are also
      testing tools to do this) and use its output to make test sequences.
      >
      >> Have you experimented with MVC?
      >
      > Yes, certainly and where it makes sense I use it. I even refactor
      > towards it.
      >
      >> Have you experimented with fakes/stubs/mocks?
      >
      > Sorry, I don't know what these are :-(
      >
      >> What parts of the gui (that are not related to the business/data
      > logic) do you feel need tests?
      >
      > KeyPress'ing, painting, tooltips and control enableing and disableing
      > for a start.
      >
      >> Would you consider your AQTest scenarios end-to-end tests, or do
      > you have ways to isolate certain components / layers of abstraction?
      > Or could you explain in more detail why it's difficult to break this
      > system into layers?
      >
      > Hmm, that's not easy for me. The main problem I have is that user
      > interaction affects the way the underlaying objects behave. As I have
      > mentioned, the quantity of information make total layer abstraction
      > very difficult. For instance, I have some 30,000 products that been
      > to be sorted, grouped and filtered by the GUI. Invoices can have >
      > 1000 detail lines, so you can see that I have my doubts about using
      > 'intermediate' data stores that feed and feed on the GUI storage
      > objects.
      >
      > I'm sure the problem is the way I'm looking at the problem. You know
      > the age old saying about the 'woods' and the 'trees'! As I am self
      > tought, I don't have the luxury of a second opinion or someone who
      > understands this facet of programming.
      >
      > TIA, Martin.
      >



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.