Tester Requirements


I wanted to keep Tester focused on doing two things very well: recording your keystrokes and mouse usage, and playing those inputs back to your application so that you can unit test faster. If you've ever explored commercial regression-testing tools, you've undoubtedly seen what a wild ride they can involve, from simply controlling a window on the screen to validating all sorts of complicated and weird data of the most obscure window properties possible. I wanted to concentrate on the developer's needs during unit testing and keep Tester simple to use. Here are the main requirements for Tester:

  1. Tester can be controlled through any language that supports COM.

  2. Given an input string of keystrokes, in the same format used by the System.Windows.Forms.SendKeys class, Tester can play the keystrokes to the active window.

  3. Tester can find any top-level or child window by its caption or class.

  4. Given any arbitrary HWND, Tester can get all the window's properties.

  5. Tester must notify the user's script of specific window creation or destruction so that the script can handle potential error conditions or do advanced window handling. Tester doesn't limit developers from extending the code in any direction they need for their shops' requirements.

  6. Tester must be able to record keystrokes and place them into a string that is compatible with the Tester playback code.

  7. When generating a Tester script, the script is self-contained so that the saved script is ready to run.

  8. The user can edit the automatically generated script before saving it.

  9. Tester can properly set focus to a specific window, including any child control, to ensure that playback goes to the correct window.

While quite complete, Tester probably isn't a general solution for your 20-person QA department. My intention was to build a tool that you and I, as development engineers, could use to automate our unit testing. To that end, I think Tester fits the bill. I used Tester quite a bit to help develop WDBG, the graphical user interface (GUI) debugger I developed as part of Chapter 4. The best part of using Tester with WDBG was that I saved myself thousands of keystrokes—this far into the book, I can still move my wrists!




Debugging Applications for Microsoft. NET and Microsoft Windows
Debugging Applications for MicrosoftВ® .NET and Microsoft WindowsВ® (Pro-Developer)
ISBN: 0735615365
EAN: 2147483647
Year: 2003
Pages: 177
Authors: John Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net