Re: [TFUI] Is test driven UI development conceptually different?

Phlip <phlipcpp-/[email protected]>
Newsgroups gmane.comp.programming.test-first-user-interfaces
Message-ID <[email protected]>
George Dinwiddie wrote:

> Our tests turned out to be not as fine-grained as we
> might for ordinary
> java objects.  Whether that's the nature of GUI TDD
> or an artifact or
> our inexperience is undetermined.  Our tests tended
> to be of the type,
> "verify that a button markes 'GO' exists", "press
> the 'GO' button", and
> "verify that the operation 'GO' was performed." 

I have found such tests come in two forms - the spot
check and the scenario. Because the latter must work
thru the same sequence of clicks as the user will
perform, the tests are long and ugly. 

Refactoring them doesn't make them short or elegant.

> (Swing doesn't work
> completely right unless you let it paint the
> screen.)

I have heard that about Jemmy.

New question:

Suppose this were a Jemmy test case:

  public void testIt ()
  {
    // Turn off Jemmy output.
    
    JemmyProperties.setCurrentOutput
(TestOut.getNullOutput ());
    
    // Shorten timeouts so things fail quicker.
    
    Timeouts.setDefault
("FrameWaiter.WaitFrameTimeout", 5000);
    Timeouts.setDefault
("DialogWaiter.WaitDialogTimeout", 5000);
    Timeouts.setDefault
("ComponentOperator.WaitComponentTimeout", 5000);
    
    // Start the application under test.
    
    HelloWorld.main (new String[0]);
    
    JFrameOperator frame = new JFrameOperator ("Hello,
World!");
    
    // Find 1st (0th) JTextField in frame.
    
    JTextFieldOperator textfield = new
JTextFieldOperator (frame, 0);
    assertTrue ("textfield is enabled",
textfield.isEnabled ());
    assertTrue ("textfield is editable",
textfield.isEditable ());
 ...
}

It paints the screen as it goes.

I don't know enough Swing to answer my favorite
question: How to introduce a temporary line to that
test which blocks the event queue until the user
clicks the close button on the testee window. (Note
the test fixtures might configure the close button to
resume the test, not destroy the window.)


=====
Phlip
  http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/TestFirstUserInterfaces/

<*> To unsubscribe from this group, send an email to:
    TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.