| Article: |
More Test-Driven Development in Python | |
| Subject: | Test Driven GUI Development? | |
| Date: | 2005-02-04 12:43:35 | |
| From: | russelllear | |
|
Much of what I'm working on now is in grabbing information from a database at a user's direction and presenting. Using test driven develpment with the database abstraction layers makes much sense.
|
||
Showing messages 1 through 1 of 1.
-
Test Driven GUI Development?
2005-02-08 12:13:46 kumar303 [View]



In case you have a GUI framework that your application is using (and you probably are unless you are writing in Assembler) then you will be able to do automated testing via expectations. You can take a mock object approach like PHP's SimpleTest (I believe this is based on JUnit mock objects). You would create a mock object for the interface of your GUI controller object and then set up expectations. For instance [I am making this up] :
mockGUI.expectOnce('drawMenu', expectedParameters)
... in the test you would call your application's menuInit() method (or whatever) and the test would fail if the GUI object didn't make a call to drawMenu() with the correct parameters. Of course... for this to be effective you have to assume that the GUI library you are using is 100% functional :)