I’ve mentioned Zombie a number of times, our internal GUI automation tool, and one of its core features is that it drives the GUI the same way a user does, via the keyboard and mouse. Zombie is designed to mimic normal user input by driving the UI under test using the low level keybd_event and mouse_event Windows API’s. The design is intentional and prevents testers from writing automation that would manipulate a UI in ways not available to a human user. This gives us
- assurance that if Zombie reproduced a problem a user could too
- dramatically improves the chance of manually reproducing whatever problem was encountered
As a result for a test writer it’s important to understand exactly how Zombie manipulates the GUI to give them the best chance of reproducing the same problem manually. In fact, recently I’ve started a page on our internal wiki which explains the internal workings of Zombie so that our QA staff has a better chance at reproducing any problems.
Back in 1994-5 when Zombie was first implemented it leveraged a DLL from Microsoft Test to handle the driving the keyboard and mouse but when we moved to Win32 in the Delphi 2.0 timeframe we had to replace the DLL with our own code that worked on Windows NT. In fact, even today the Delphi Unit that contains all of our core mouse and keyboard routines is called MSTest.pas. I sort of laugh when I open this file and see the PVCS comments at the top where my earliest comment reads:
* Rev 2.6 12 Jul 1995 12:42:02 STREFETHEN
* Added a functions that provide mouse click support for TreeView and Header
Ah, now those were the good old days!
Update: I almost forgot, I recently posted a Flash movie of Zombie running against Highlander here.