How to: Use the Automated Test Harness

You can automate testing of your Visual FoxPro applications by creating and running scripts using the Automated Test Harness. The Automated Test Harness records and plays mouse and keyboard events using Microsoft Active Accessibility (MSAA) technology and is installed in the Microsoft Visual FoxPro VersionNumber\Tools\Test directory. For additional information, see the ReadMe file, aatesthelp.htm, in the \Tools\Test directory.

To run the Automated Test Harness

  1. Run the Automated Test Harness from \Tools\Test\AATEST.APP

    -OR-

    In the Visual FoxPro Command window, enter the following line:

    DO (HOME() + "tools\test\aatest") 
    
  2. To record the script, click Record in the toolbar or on the Record menu.

    A list of available applications appears.

  3. Select a Visual FoxPro application, and, when prompted, enter a name for your text script.

    The selected Visual FoxPro application or window appears, and the tool is ready to record the events.

  4. Record the events. Run your application as you typically would using the keyboard and mouse. Make sure you have run through all of the user interface elements, including forms, menus, windows, and dialog boxes.

  5. When finished, click Stop in the toolbar. You also can pause and resume recording as needed.

To view the events log, which has been selected or currently recorded, click "Edit the script."

To play back scripts, select the script you want to run, and click Play. If the program detects an error, you see a prompt in the testing application.

To see the test log, select the Test Log tab.

Note

Only one instance of the test tool can be run from one installation because the test tables are opened exclusively.

See Also

Reference

Accessibility Browser Window
Debugging and Error-Handling Language

Other Resources

Utility Programs
Testing and Debugging Applications