Search the web
Sign In
New User? Sign Up
TestFirstUserInterfaces
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: TDD:ing MFC   Message List  
Reply | Forward Message #990 of 1051 |
"Phlip" <phlip2005@...> writes:

> Anthony Williams wrote:
>> I've written a
>> bunch of helper functions for simulating various user actions on a dialog
>> by
>> sending the appropriate sequence of messages. You can then simulate e.g. a
>> selection of an item from a combo drop-down, or a double-click on a list
>> item,
>> or a user entering data in a text box and assert on the consequences.
>
> I suspect all such functions can run without displaying the window.

Absolutely. One of my helper functions is called windowWouldBeVisible() --- I
use it to verify that controls are correctly hidden or shown as appropriate,
even when the dialog is not actually displayed.

I always create the window, but without the WS_VISIBLE flag, so it's never
actually shown.

> And they certainly don't run like capture-playback tests...

No. Everything is based on control ID rather than mouse movements. The
simulation functions verify that the control is present, and of the
appropriate type, and then fire the appropriate sequence of messages as-if the
user had done a particular action. Sometimes I don't bother with the full set
of messages, if I know that I only need a couple in order to get the effect I
require, but I can always extend the simulation functions when more accurate
representation is required.

Anthony
--
Anthony Williams
Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL




Fri Jun 15, 2007 2:07 pm

anthony_w.geo
Offline Offline
Send Email Send Email

Forward
Message #990 of 1051 |
Expand Messages Author Sort by Date

... Absolutely. One of my helper functions is called windowWouldBeVisible() --- I use it to verify that controls are correctly hidden or shown as appropriate, ...
Anthony Williams
anthony_w.geo
Offline Send Email
Jun 15, 2007
2:30 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help