I am currently trying out test-driven development, and want to write a small FXRuby application. Unfortunately, I have no idea how to write unit tests when dealing with GUIs. Does anyone have samples/a good link on how to do this?
I am currently trying out test-driven development, and want to write a
small FXRuby application. Unfortunately, I have no idea how to write
unit tests when dealing with GUIs. Does anyone have samples/a good link
on how to do this?
Rich, GUI classes are notoriously hard to unit-test, and at the same
time they are usually very easy to test manually. I think, majority of
"test-infested" programmers don't write unit tests for thick GUIs, for
this kind of reasons.
It is certainly a wrong kind of project to get a taste of test driven
development.
Best regards,
Alex
···
On Sun, 2004-06-27 at 20:28, martinankerl at eml dot cc wrote:
I am currently trying out test-driven development, and want to write a
small FXRuby application.
On Wed, 30 Jun 2004 04:15:35 +0900, Alexey Verkhovsky <alex@verk.info>
On Sun, 2004-06-27 at 20:28, martinankerl at eml dot cc wrote:
I am currently trying out test-driven development, and want to write a
small FXRuby application.
2 cents worth of friendly advice: don't do that.
Rich, GUI classes are notoriously hard to unit-test, and at the same
time they are usually very easy to test manually. I think, majority of
"test-infested" programmers don't write unit tests for thick GUIs, for
this kind of reasons.
It is certainly a wrong kind of project to get a taste of test driven
development.
Presumably one does TDD on the domain objects, and some sort of manual
testing on the interfaces?
Presumably one does TDD on the domain objects, and some sort of manual
testing on the interfaces?
Yes. And we try to keep the GUI components as lightweight as possible.
Often they become just a matter of wiring this button to that domain
object method.
···
--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)