Re: [TFUI] Testing WinForms
"Stefan Lieser" <[email protected]> Fri, 6 Jan 2006 09:39:05 +0100
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Message-ID | <05c801c6129c$a7883ec0$0cc8a8c0@slieser> |
Hi Dan,
> In my opinion testing if the text reaches the controller, after being
> entered into a textbox, is not very helpful, and it doesn't seem like a
> very useful test to me.
How do you make sure that the data entered into a form is propagated to your
business domain?
> Now testing from the customer's perspective, you should test only from the
> user interface, and have nothing to do with the controller. A test should
> follow the steps of preparing, acting and verifying but all from one
> perspective, and if that's the user perspective then , maybe entering a
> username and a password in a login panel is the preparation and acting is
> clicking the login button, and depending on the data introduced verifying
> is testing whether you've reached the right screen or that you have a
> message box saying that your credentials are wrong. I think that this can
> be very well done using NUnitForms, although I saw that usually using
> NUnitForms means writing a lot of code (I even wrote something about it:
> http://danbunea.blogspot.com/2005/08/simplifiing-nunitforms-functional.html).
If for example the user wants to be able to commit your login dialog by
clicking the Ok button or by pressing the Return key. How do you make sure
your dialog supports both?
I think NUnitForms is a good tool for doing UI tests. The problem I have
with it is, that the low level keyboard and mouse actions do not work in all
scenarios. Using .NET's SendKeys class solves some of those problems. I will
investigate if it makes sense to use SendKeys inside of NUnitForms.
> And if you don't want to be testing exclusivly from a customer
> perspective, I think Model View Presenter is a very good choice for TDD
> (http://danbunea.blogspot.com/2005/11/model-view-presenter-is-testing_27.html)
Agreed. But there is still the problem of testing that the controls on the
form behave as expected.
Sincerely,
Stefan Lieser
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/