Re: [TFUI] testing Qt code
Phlip <phlipcpp-/[email protected]>
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Message-ID | <[email protected]> |
dammak rafik wrote:
> table respecting MVC pattern.two for testing GUI
> how
> I must do?test
> tools for this case?I am developing a kind of
> unit
> testing (no with
> cppunit) and I like respect this method in GUI
> development.
David Dibben wrote:
> We have been using Qt and CppUnit together with out
> too many problems.
This helps dammak, so he must reply before we try to
help more.
But David also answered my questions:
> Phlip wrote:
> > What is the Qt equivalent of
> > gtk_main(), and how to not call it?
> I don't think that there is an equivalent in Qt. The
> main event loop is
> generally started by calling the exec() function on
> QApplication. SInce
> this is usually called from main() it is easy not to
> call in the tests..
Calling it is as important as not calling it. Reach
for these goals:
- Just Another Library. Under test, the GUI minimizes
side-effects, including minimal popping-up
of windows
- Treat I/O Like a Spigot. When you want to see
a window in a specific state, such as just
after a test case, you should be able
to raise that window with very little
thinking or tweaking. Given reveal(aWin),
what can we put inside reveal that displays
_any_ window? For Qt, I might borrow the
source of the exec() method and replicate
it. Or I might marshall aWin into another
process space, and feed it to a QApplication
in there, if that works.
Any I/O port in a storm!
=====
Phlip
http://www.xpsd.org/cgi-bin/wiki?TestFirstUserInterfaces
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/