[TFUI] Re: [agile-testing] unit testing a web UI
"Phlip" <[email protected]>
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Message-ID | <000b01c4f1ac$e0074be0$0102a8c0@DF619121> |
Steve Eichert wrote:
> With the "view" and "controller" residing outside of the web
> application I can use my normal testing strategies to ensure each
> works as expected. However, I'm still left with a web form (in .NET
> apps) that have a bunch of controls and other behavior which isn't
> being tested. I've played around with NUnitAsp as a possible
> solution, but, it doesn't allow me to test things the way I feel is
> necessary. I have no way to verify that my web app implements the
> necessary interfaces and I have no way to test that the implementation
> of the interface is correct. For example the web page might return
> the lastName.Text when I ask for First Name. The other problem is
> that I don't have a good way to setup "state" for the web pages that
> I'm testing. What if I want my web app to use a Mock Repository, or a
> different database?
>
> How are you unit testing your web UI's?
The great thing about HTTP is it forms an undeniable interface right in the
middle of your GUI layer.
Test-first it by emulating a web browser:
http://www.c2.com/cgi/wiki?HttpUnitTutorial
Next, you can drive Internet Explorer's DOM objects thru Automation, so you
can also write tests that drive IE to hit your site, click on controls, etc.
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
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/