[TFUI] TFUI for web applications -- writing reveal() methods

Owen Rogers <[email protected]> Sat, 20 Aug 2005 13:04:12 -0400
Newsgroups gmane.comp.programming.test-first-user-interfaces
Message-ID <[email protected]>
after a fairly long stint working on rich clients and applying TFUI
principles, i'm back on a web project and i'm trying to figure out how
to get some of the benefits of TFUI within this context. 
specifically, i'm starting by trying to figure out how to get reveal()
working so that we can move away from evil wizards and UI designers,
and really test-drive our UI.

the challenge of working in a web context is that, at least within the
.net and java world AFAIK, you need to be running within the context
of a web server to get your pages or controls to display correctly and
support interactivity.  this seems to be a hard problem to solve, so
i'm trying to start with something simpler:

for web pages i could write a reveal method that just navigates to the
url of the page that i'm working on (ie. Process.Start(url)).  the
problem with this is that the instance of the page class that i'm
working on in my test is going to be different than what will be
displayed in the browser.  as these are different instances, i won't
be able to populate it or drive it from my test.

this approach also doesn't work with custom web controls (asp.net
development makes extensive use of aggregating common controls into
custom components) as i don't have a url that i can navigate to
directly.

now, instead what i could do in the reveal() method is to invoke the
Render() method shared by pages and controls.  this would output the
html for the specific page or control instance that i've created and
set up in my test.  i could then pass the html through to an instance
of an IE com object which i could then display.

this approach should work pretty well.  it doesn't however, support
any postback calls to the server -- which is something asp.net is
particularly fond of.  what i'd like is to have postbacks routed back
to my specific page or control instance under test so that i can debug
it and interact with the response.  it might be possible to do
something funky registering for IE events and using that to invoke
methods in the object under test -- but it seems pretty complex.

what have other people tried?
cheers,
owen.

-- 
Owen Rogers | http://dotnetjunkies.com/weblog/exortech |
CruiseControl.NET - http://ccnet.thoughtworks.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hnmt66q/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124564715/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

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/