Chapter 13
In Chapter 3, I talked about unit tests and explained why unit testing is such a vital part of producing high-quality code. For those of us who work mostly on an application's internal logic, unit tests can be fairly simple. Look at the files in SourceCode\BugslayerUtil\Tests on the companion CD, and you'll see all the unit tests I used to develop BUGSLAYERUTIL.DLL. All those tests are console applications that do their jobs admirably.
Unfortunately, testing user interface (UI) code is more difficult. In this chapter, I'll present a utility I wrote, Tester, that will help you automate some of your UI testing. Although not as extensive as a full-blown commercial regression-testing tool, Tester is sophisticated enough to let you run your applications through their unit testing paces. Not only that, but Tester is much easier to use and less expensive than a commercial system.